"gatsby develop" produces "ERROR #98123 WEBPACK Generating SSR bundle failed Cannot find module '@babel/core'”
See original GitHub issueHere is the full project on Github
I run gatsby develop and here is the full console output
gatsby develop
success open and validate gatsby-configs - 0.042s
success load plugins - 0.462s
success onPreInit - 0.012s
success initialize cache - 0.045s
success copy gatsby files - 0.240s
success onPreBootstrap - 0.062s
success createSchemaCustomization - 0.018s
success source and transform nodes - 0.165s
success building schema - 0.502s
success createPages - 0.066s
success createPagesStatefully - 0.334s
success onPreExtractQueries - 0.004s
success update schema - 0.069s
success extract queries from components - 0.204s
success write out requires - 0.043s
success write out redirect data - 0.012s
success onPostBootstrap - 0.011s
⠀
info bootstrap finished - 10.645 s
⠀
success run queries - 0.047s - 3/3 63.54/s
ERROR #98123 WEBPACK
Generating SSR bundle failed
Cannot find module '@babel/core'
Require stack:
- /Dir/node_modules/@babel/plugin-transform-react-jsx/lib/transform-classic.js
- /Dir/node_modules/@babel/plugin-transform-react-jsx/lib/index.js
- /Dir/node_modules/@emotion/babel-preset-css-prop/dist/babel-preset-css-prop.cjs.dev.js
- /Dir/node_modules/@emotion/babel-preset-css-prop/dist/babel-preset-css-prop.cjs.js
- /Dir/tutorial-part-four/node_modules/@babel/core/lib/config/files/plugins.js
- /Dir/tutorial-part-four/node_modules/@babel/core/lib/config/files/index.js
- /Dir/tutorial-part-four/node_modules/@babel/core/lib/index.js
- /Dir/tutorial-part-four/node_modules/babel-loader/lib/index.js
- /Dir/tutorial-part-four/node_modules/gatsby/dist/utils/babel-loader.js
- /Dir/tutorial-part-four/node_modules/loader-runner/lib/loadLoader.js
- /Dir/tutorial-part-four/node_modules/loader-runner/lib/LoaderRunner.js
- /Dir/tutorial-part-four/node_modules/webpack/lib/NormalModule.js
- /Dir/tutorial-part-four/node_modules/webpack/lib/NormalModuleFactory.js
- /Dir/tutorial-part-four/node_modules/webpack/lib/Compiler.js
- /Dir/tutorial-part-four/node_modules/webpack/lib/webpack.js
- /Dir/tutorial-part-four/node_modules/gatsby/dist/commands/develop.js
- ~/.config/yarn/global/node_modules/gatsby-cli/lib/create-cli.js
- ~/.config/yarn/global/node_modules/gatsby-cli/lib/index.js
File: .cache/develop-static-entry.js
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
3 pages Failed gatsby-starter-hello-world
Failed attempts so far
I’ve tried deleting .cache, node_modules yarn.lock/package-lock.json and reinstalling. I tried this using both npm and yarn (separately, never together), and upgrading yarn, and node
I also tried
rm ~/Library/Yarn/Caches/
yarn add @babel/core
and receive
yarn add @babel/core
yarn add v1.22.4
warning ../package.json: No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
warning Pattern ["@babel/core@^7.9.0"] is trying to unpack in the same destination "~/Library/Caches/Yarn/v6/npm-@babel-core-7.9.0-ac977b538b77e132ff706f3b8a4dbad09c03c56e-integrity/node_modules/@babel/core" as pattern ["@babel/core@^7.8.7"]. This could result in non-deterministic behavior, skipping.
warning url-loader@1.1.2: Invalid bin field for "url-loader".
[3/4] 🔗 Linking dependencies...
[4/4] 🔨 Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ @babel/core@7.9.0
info All dependencies
└─ @babel/core@7.9.0
✨ Done in 164.67s.
Yarn, node and Gatsby version
yarn --version
1.22.4
node --version
v13.13.0
gatsby --version
Gatsby CLI version: 2.11.7
Gatsby version: 2.20.20
Note: this is the Gatsby version for the site at: /Dir/tutorial-part-four
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:13 (2 by maintainers)
Top Results From Across the Web
Developing webapp with React & Gatsby: receiving "ERROR ...
Developing webapp with React & Gatsby: receiving "ERROR #98123 WEBPACK Generating SSR bundle failed Cannot find module '@babel/core'".
Read more >npm install @babel/core @babel/preset-env - You.com
Module build failed (from ./node_modules/babel-loader/lib/index.js ... ... Bug Report I came across this issue while trying to setup babel with webpack to compile ......
Read more >The natds-js from natura-cosmeticos - Coder Social
But when I run gatsby develop , I see the following message: ERROR #98123 WEBPACK Generating SSR bundle failed Can't resolve '.
Read more >gatsby - ينتج "gatsby Develop" "ERROR # 98123 WEBPACK فشل ...
gatsby develop success open and validate gatsby-configs - 0.042s success load ... ERROR #98123 WEBPACK Generating SSR bundle failed Cannot find module ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s crappy that this exists as an error on the tutorial. I’m stuck on it, tried to upgrade.
I did succeed after upgrading a week or so later. Now my gatsby versions are: