Replies: 7 comments 1 reply
-
I bumped react and react-dom from 18.2 to 18.3.1 and now consistantly get the same issue. Downgraded to 18.2, error went away. try pinning to 18.2 and see if it fixes it for you? I have no idea of course the underlying issue |
Beta Was this translation helpful? Give feedback.
-
i have a similar problem, using these versions:
|
Beta Was this translation helpful? Give feedback.
-
I assume in other cases, you need to match the react version if whatever How I fixed this:
found that in the monorepo, some deps had pinning |
Beta Was this translation helpful? Give feedback.
-
I'm running into the same problem, i bumped React from 18.3.1 down to 18.2 and it didn't work.
|
Beta Was this translation helpful? Give feedback.
-
@icbrahimc I answer the same problem already here It is about using a fixed version of react in the |
Beta Was this translation helpful? Give feedback.
-
it worked for me when I went back to react 18.2 and react-dom 18.2 |
Beta Was this translation helpful? Give feedback.
-
I had to delete my package-lock.json and npm modules and reinstall everything to build. I think you could run into an issue with ci/cd where cache is causing version mismatching between deps as well. |
Beta Was this translation helpful? Give feedback.
-
Summary
I'm experiencing an issue while deploying my Next.js project via AWS Amplify. My Next.js project is part of a Lerna monorepo. When I attempt to run npm run build locally or deploy via AWS Amplify, I encounter the following error:
The error occurs during the prerendering of static pages such as /404 and /500. The error traceback points to issues with react, react-dom, and styled-jsx during the server-side rendering process.
Interestingly, the project builds correctly when run outside of the monorepo setup. This suggests that the issue might be related to the way dependencies are managed within the monorepo.
Here's my package.json
If anyone has any suggestions please advise! Been wasting a few days on trying to get this to work
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions