小编Net*_*ena的帖子

如何更新我的盖茨比及其依赖项

我是 React 新手,我正在尝试更新我的 gatsby 及其依赖项,但不起作用。在我已经放置的终端上npm outdated,我在下面得到了这个。

Package                    Current   Wanted  Latest  Location                                Depended by
gatsby                      2.32.4   2.32.9   3.0.0  node_modules/gatsby                     form-gatsby
gatsby-plugin-sass           3.2.0    3.2.0   4.0.0  node_modules/gatsby-plugin-sass         form-gatsby
gatsby-source-filesystem    2.11.1   2.11.1   3.0.0  node_modules/gatsby-source-filesystem   form-gatsby
gatsby-transformer-remark   2.16.1   2.16.1   3.0.0  node_modules/gatsby-transformer-remark  form-gatsby
react                      16.13.1  16.14.0  17.0.1  node_modules/react                      form-gatsby
react-dom                  16.13.1  16.14.0  17.0.1  node_modules/react-dom                  form-gatsby
Run Code Online (Sandbox Code Playgroud)

当我尝试运行此命令时:npm update我收到以下错误。

npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN Found: graphql@15.5.0
npm WARN node_modules/graphql
npm WARN   graphql@"^15.4.0" from gatsby@3.0.0 …
Run Code Online (Sandbox Code Playgroud)

node.js npm reactjs graphql

6
推荐指数
1
解决办法
8175
查看次数

错误:找不到模块“gatsby-plugin-image/graphql-utils”

所以我试图在 Netlify 中运行我的测试博客,但我在下面有这个错误。我不知道发生了什么

9:27:11 PM: error "gatsby-source-contentful" threw an error while running the setFieldsOnGraphQLNodeType lifecycle:
9:27:11 PM: Cannot find module 'gatsby-plugin-image/graphql-utils'
9:27:11 PM: Require stack:
9:27:11 PM: - /opt/build/repo/node_modules/gatsby-source-contentful/extend-node-type.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby-source-contentful/gatsby-node.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/index.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/services/initialize.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/services/index.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/index.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/commands/build.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/create-cli.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/index.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/dist/bin/gatsby.js
9:27:11 PM: - /opt/build/repo/node_modules/gatsby/cli.js
9:27:11 PM: 
9:27:11 …
Run Code Online (Sandbox Code Playgroud)

reactjs gatsby netlify gatsby-plugin

3
推荐指数
2
解决办法
1482
查看次数

标签 统计

reactjs ×2

gatsby ×1

gatsby-plugin ×1

graphql ×1

netlify ×1

node.js ×1

npm ×1