-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
React 17 gatsby won't start #27592
Comments
Hi @theskillwithin! Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look. Thanks for using Gatsby! 💜 |
Hey ! I encountered the same problem. Deleting the node_modules folder, package-lock.json and redoing the install with I had the problem on 2 projects, that fixed it for both of them. |
I have the same error and it works only when used yarn. |
I prefer using NPM, should I wait for a stable Gatsby update that integrates without issues? |
I have the same error using NPM |
@wardpeet OS: macos catalina 10.15.7 gatsby new gatsby-site https://github.com/gatsbyjs/gatsby-starter-hello-world cd gatsby-site update versions in package.json
remove package-lock.json and node_modules rm -rf package-lock.json node_modules clean install
the error
|
I have the same error, however, when I push the same code to Netlify, it works and builds fine. |
Sorry, seems to be an issue with npm and dependency management. Please try yarn in the mean time |
Can you try using |
Is that to be installed as global or a dev module, or does it not matter? |
In your project (so not the global one), because those errors are very likely caused by the way |
@pieh This is what I did: With all my current setup just like it is, in my project, I ran |
I found a quick workaround using yarn:
Now you can keep using npm to manage your dependencies. |
I can confirm that |
@pieh Thank you. That works great. Another question though, do we need to keep using this |
We do plan to merge it soonish, but we also did similar attempt once before and it broke things for a lot of users, so we are taking more precautions this time around and much more manual testing |
Guys, you DON'T need |
Thanks. The issue is now resolved! |
Why is this issue closed, it's still not working with NPM... or did I missed the whole fix? |
@mikeyfe6 either one of your dependencies or your lock file forces probably create issues. Regenerate your lock file and/or update your dependencies. That should help. React v17 does not work for me as well, I get: I suspect this to be because of
|
This reverts commit b807166. React 17 breaks Gatsby: gatsbyjs/gatsby#27592
This reverts commit b807166. React 17 breaks Gatsby: gatsbyjs/gatsby#27592
I use NPM to install all my package. I follow the steps at below: npm install -g npm-check-updates //during the npm package installations u will notice many warnings. Just ignore it. // once the package update done, you need to delete the node_modules folder again from your root directory. DO NOT DELETE "package-lock.json" !!!! // final steps_ npm ci // once package updates completes, use the normal gatsby commands to start your development server. // in future if you use ncu -u again then you need to follow the entire steps. |
After upgrading to React 17,
gatsby develop
andgatsby clean
does not run successfullyEnvironment
npm version: 6.14.8
node version: 12.19.0
gatsby version: 2.24.84
The text was updated successfully, but these errors were encountered: