我正在从他们的官方网站上完成 Gatsby 的第三部分教程,但遇到了一个问题。
首先当我
gatsby new tutorial-part-three https://github.com/gatsbyjs/gatsby-starter-hello-world
我在终端中收到这些错误:
warning "gatsby > react-hot-loader@4.12.18" has unmet peer dependency "@types/react@^15.0.0 || ^16.0.0".
warning "gatsby > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
Run Code Online (Sandbox Code Playgroud)
但是我仍然可以在 localhost:8000 中运行该网站。当我按照教程使用以下命令安装 Typography 插件时,真正的问题出现了:
npm install --save gatsby-plugin-typography react-typography typography typography-theme-fairy-gates
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误:
npm WARN gatsby@2.18.4 requires a peer of react@^16.4.2 …Run Code Online (Sandbox Code Playgroud)