-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gatsby doesn't work with React 17 RC (Error: React-Hot-Loader: AppContainer should be patched) #26979
Comments
Reason: |
|
Thank you so much! |
Concretely, if you're running this error, the fix is to run If this didn't help, delete your lockfile ( |
Still getting error that React is not defined after 'npm update', removing 'package-lock.json' and cache clean.
|
This does not sound like the error described in this issue. File a new one? |
This is another error, and I created a issue for it: |
I still have the same error but Edit: I had to add this resolution to fix it, but I don't understand why. Is there a solution with which I can omit this resolution? {
"resolutions": {
"react-dom": "npm:@hot-loader/react-dom",
}
} |
@sapkra I tried the solution thing and it didn't work for me. Would that I still get this error with the latest gatsby
|
@tony Have you really added it as an |
try finding |
When attempting to run the website in development, after making no changes, I was greeted with the following error message: > The above error occurred in the <StoreStateProvider> component: > in StoreStateProvider > in App After some digging, I dsocvered I needed to update React, React DOM, and Gatsby. See: gatsbyjs/gatsby#19827 Then after resolving the above issue, I found this error message when actually viewing the development server: > Error: React-Hot-Loader: AppContainer should be patched See: gatsbyjs/gatsby#26979
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 complete follow 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. |
I meet the same question,I use |
react
andreact-dom
to17.0.0-rc.1
gatsby
to latestyarn dev
This is the result:
While there's ongoing work to make Fast Refresh the default for compatible setups, in the meantime, can we figure out how to fix this error?
I'm guessing that what needs to happen is for hot-loader/react-dom#41 to be solved by publishing a patched package. This is likely little work, but requires access to that package (cc @theKashey). I could do this myself if I had the instructions.
The text was updated successfully, but these errors were encountered: