Gatsby 4 upgrade - typescript errors? Not using typescript

Viewed 435

I'm getting these build errors and I don't know where to start!

I'm not using gatsby-plugin-typescript

Thanks!

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

This is the error in dev:

<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.
1 Answers

Put these into package.json

  "resolutions": {
    "gatsby-plugin-typescript": "^4.10.0",
    "typescript": "^4.0.0"
  },

same issues and warnings here. I am using gatsby-theme-auth0-ts from https://www.gatsbyjs.com/plugins/gatsby-theme-auth0-ts, and the config in package.json eliminate those dozens of warning messages.

Related