gatsby: Can no longer run gatsby develop
Description
I can no longer run gatsby develop after updating the CLI.
Steps to reproduce
run gatsby develop
Expected result
Should run develop fine
Actual result
ERROR #98124 WEBPACK
Generating SSR bundle failed
Can't resolve 'react/jsx-runtime.js' in '/Users/joetaylor/Documents/www/joebentaylor/.cache'
If you're trying to use a package make sure that 'react/jsx-runtime.js' is installed. If you're trying to use a local file make sure that the path is correct.
File: .cache/develop-static-entry.js
Environment
System:
OS: macOS 10.15.7
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.19.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Languages:
Python: 2.7.15 - /usr/local/bin/python
Browsers:
Chrome: 86.0.4240.80
Edge: 83.0.478.54
Firefox: 80.0.1
Safari: 14.0
npmGlobalPackages:
gatsby-cli: 2.12.107
gatsby: 2.24.77
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 26 (11 by maintainers)
It seems like the common thread is that you use React in development and Preact in production. To me, this sounds like an extremely fragile setup because Preact is known to have behavior differences and incompatibilities with React, but that’s your call. What I think is happening here is that Gatsby detects React supports the new JSX transform (so it uses it), but it isn’t aware of the Preact override, and I think maybe Preact doesn’t support it yet (?)
Facing the same issue.
Edit: @joebentaylor1995, seems to go away when I revert back to React@16.13.1 from React@16.14.0.
Do you still have this with the latest gatsby? Try removing node_modules, package-lock.json and try installing again.
Can confirm.
Same problem.