首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >盖茨比4升级打字错误?不使用打字本

盖茨比4升级打字错误?不使用打字本
EN

Stack Overflow用户
提问于 2022-01-15 20:07:59
回答 1查看 521关注 0票数 4

我得到了这些构建错误,我不知道从哪里开始!

我不使用gatsby-plugin-typescript

谢谢!

代码语言:javascript
运行
复制
11:52:19 AM: <w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving 'gatsby-plugin-typescript/gatsby-node' in /opt/build/repo/node_modules/gatsby/dist/bootstrap for build dependencies doesn't lead to expected result '/opt/build/repo/node_modules/gatsby-plugin-typescript/gatsby-node.js', but to '/opt/build/repo/node_modules/gatsby/node_modules/gatsby-plugin-typescript/gatsby-node.js' instead. Resolving dependencies are ignored for this path.
<w>  at unknown 4 gatsby-plugin-typescript/gatsby-node
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-themes/index.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-themes/index.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-config-and-plugins.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-config-and-plugins.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/load-config-and-plugins.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/load-config-and-plugins.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/index.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/utils/worker/child/index.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby-worker/dist/index.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby-worker/dist/index.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/utils/report-once.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/utils/report-once.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/utils/page-mode.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/utils/page-mode.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/redux/actions/public.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/redux/actions/public.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/redux/actions/index.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/redux/actions/index.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/utils/api-runner-node.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/utils/api-runner-node.js
11:52:19 AM: <w>  at file dependencies /opt/build/repo/node_modules/gatsby/dist/utils/webpack.config.js
11:52:19 AM: <w>  at file /opt/build/repo/node_modules/gatsby/dist/utils/webpack.config.js
11:52:19 AM: <w>  at resolve commonjs /opt/build/repo/node_modules/gatsby/dist/utils/webpack.config.js

这是dev中的错误:

代码语言:javascript
运行
复制
<w> [webpack.cache.PackFileCacheStrategy/webpack.FileSystemInfo] Resolving 'gatsby-plugin-typescript/gatsby-node' in /Users/me/GitHub/project/node_modules/gatsby/dist/bootstrap for build dependencies doesn't lead to expected result '/Users/me/GitHub/project/node_modules/gatsby-plugin-typescript/gatsby-node.js', but to '/Users/me/GitHub/project/node_modules/gatsby/node_modules/gatsby-plugin-typescript/gatsby-node.js' instead. Resolving dependencies are ignored for this path.
EN

回答 1

Stack Overflow用户

发布于 2022-03-31 04:17:22

把这些放进package.json

代码语言:javascript
运行
复制
  "resolutions": {
    "gatsby-plugin-typescript": "^4.10.0",
    "typescript": "^4.0.0"
  },

同样的问题和警告。我使用的是来自https://www.gatsbyjs.com/plugins/gatsby-theme-auth0-ts的gatsby主题-auth0-ts,而package.json中的配置消除了这几十条警告消息。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70725027

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档