I create gatsby new hello
and I go to the folder hello cd hello
and run gatsby develop
, them I get error:
ERROR #98123 WEBPACK
Generating SSR bundle failed
[BABEL] /home/irek/node-p/gatsby/hello/.cache/develop-static-entry.js: Package exports for '/home/irek/node-p/gatsby/hello/node_modules/@babel/helper-compilation-targets' do not define a '.' subpath
File: .cache/develop-static-entry.js
I found similar requests but it didn't work. I updated my helper-compilation-targets
, gatsby-cli
It seems that the file causing this is file: .cache/develop-static-entry.js
and with his subpath.
Gatsby should start my localhost.
Error #98123 WEBPACK
Generating SSR bundle failed
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 13.1.0 - ~/.nvm/versions/node/v13.1.0/bin/node
Yarn: 1.22.0 - ~/.nvm/versions/node/v13.1.0/bin/yarn
npm: 6.13.7 - ~/.nvm/versions/node/v13.1.0/bin/npm
Languages:
Python: 2.7.17 - /usr/bin/python
Browsers:
Chrome: 80.0.3987.116
Firefox: 73.0
npmPackages:
gatsby: ^2.19.7 => 2.19.7
gatsby-image: ^2.2.39 => 2.2.39
gatsby-plugin-manifest: ^2.2.39 => 2.2.39
gatsby-plugin-offline: ^3.0.32 => 3.0.32
gatsby-plugin-react-helmet: ^3.1.21 => 3.1.21
gatsby-plugin-sharp: ^2.4.3 => 2.4.3
gatsby-source-filesystem: ^2.1.46 => 2.1.46
gatsby-transformer-sharp: ^2.3.13 => 2.3.13
npmGlobalPackages:
gatsby-cli: 2.8.30
I upgrade node
version to 13.7+
and it solved problem.
Hi! I'm on node 13.10.1 and I'm still having this exact problem.
Environment
System:
OS: Raspian Buster
Binaries:
Node: 13.10.1
npm: 6.13.7
Browsers:
Vivaldi: 2.8.1664.44
npmGlobalPackages:
gatsby-cli: 2.10.2
Following this error is printed:
Generating SSR bundle failed
[BABEL] /home/<user>/Documents/programming/personal_website/web/.cache/develop-static-entry.js: No "exports" main resolved in /home/<user>/Documents/programming/personal_website/web/node_modules/@babel/helper-compilation-targets/package.json
File: .cache/develop-static-entry.js
@varlevi you need node version min. 13.7+
I'm also having this issue with Node version 13.10.1, and Gatsby CLI version 2.10.2.
@itejman: Isn't 13.10.1 greater than 13.7?
Looks like there's quite a few closed issues relating to this error, all taking place in somewhat different scenarios and being solved in different ways. Check out #22066, #20225, #19922, and #17557.
EDIT: I've tried pretty much all the applicable solutions and they've done nothing except take up almost an entire GB of space on my computer with npm installs. Ouch.
I too was having the same problem using the latest Node version (13.10.1) on my Ubuntu setup. I eventually resolved this by 'downgrading' to the "Stable" version of Node (currently 12.16.1) by executing this command:
_sudo n stable_
Now when I run _gatsby develop_ everything completes successfully. So it appears this is an issue with the "Current" Node version (13.10.1).
I hope this helps others get Gatsby working :-)
I'm also hitting this issue, with Node 13.10.1 (and works with 12.16.1). https://github.com/nodejs/node/issues/32107 appears to the the nodejs issue tracking this
Yes. This works for me as well. Unfortunate we can't use the more recent version, but I'm sure the node team is working on it.
i just use node version 8.12.0 without this problem
I had the exact problem but solved by upgrading package via yarn upgrade
Same problem here, started today all of a sudden.
Error appears in node version 13.11, NPM-6.14.
Generating SSR bundle failed
/Users/test/repo/.cache/loader.js: Unknown helper createSuper
File: .cache/loader.js
Switching between node versions with n, as well as deleting node_modules & cache didn't change anything.
Edit:
After loosing a couple of hours on this, I'll managed to get it running again, maybe this can help someone.
Downgrading packages, switching yarn/npm, did not work.
I believe deleting .cache, node_modules and (most importantly) package.lock.json did the trick.
However, only for npm, error still happens when I use yarn.
Same problem with Node 12.6.1
I deleted .cache and node_modules and nothing happened.
Deleting package-lock.json did the trick.
Thanks @elias-thok
Deleting your package-lock.json
shouldn't be considered a solution and can have unintended consequences if you don't know what you're doing.
@jamesdbruner Good point. I think that this problem needs some further fleshing out.
I am on node 14.2.0, the problem's still lurking.
npx yarn upgrade
fixed this for me
@itejman, please consider reopening this issue. It's Closed but it has no clear solution, and we don't even know the cause.
@itejman, please consider reopening this issue. It's Closed but it has no clear solution, and we don't even know the cause.
Ok.
Please provide a minimal reproduction then as otherwise this issue here isn't actionable.
Hi!
I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do reopen the issue.
Thanks!
For anyone else having this issue, it seems that the only solution is deleting your package-lock.json file.
Most helpful comment
I had the exact problem but solved by upgrading package via
yarn upgrade