Replies: 143 comments 180 replies
-
Furthermore, you can likely drop |
Beta Was this translation helpful? Give feedback.
-
Have the same issue |
Beta Was this translation helpful? Give feedback.
-
SOLVED: |
Beta Was this translation helpful? Give feedback.
-
Same issue, but with useRouter |
Beta Was this translation helpful? Give feedback.
-
For what it's worth, I was running into this same issue on Node 16.16.0, and upgrading to 18.5.0 resolved it. 🤷 |
Beta Was this translation helpful? Give feedback.
-
Got this error after upgrading the app from Next 13.1.6 to the latest Next 13.4.0, including some other dependencies, and deploying to Vercel:
Locally everything is perfect. Fails on Vercel. Made sure that local and remote Node version is 18. That didn't help. |
Beta Was this translation helpful? Give feedback.
-
I am still getting this error in 13.4.3 , however I am using turbo repo on top of it which seems to trigger the bug |
Beta Was this translation helpful? Give feedback.
-
Same error in next ^13.4.4 |
Beta Was this translation helpful? Give feedback.
-
Same error in Next 13.4.6 under Downgrading to Next 13.4.5 works |
Beta Was this translation helpful? Give feedback.
-
Had a same problem in 13.3.0, solved in 13.4.7. |
Beta Was this translation helpful? Give feedback.
-
Dealing with this extremely frustrating error for several days now. |
Beta Was this translation helpful? Give feedback.
-
I confirm this in 13.4.8, I downgraded to 13.4.5 and the same thing. |
Beta Was this translation helpful? Give feedback.
-
Out of curiosity are you using React Context? Or a library that uses React Context? |
Beta Was this translation helpful? Give feedback.
-
I faced the same issue and it was fixed in 13.4.7 version
|
Beta Was this translation helpful? Give feedback.
-
I have this issue right now, any solution? |
Beta Was this translation helpful? Give feedback.
-
I encountered the same issue and discovered that it was caused by a globally installed version of next.js. After removing the global installation and keeping next.js only within my project, the error was resolved. I hope my experience helps someone else facing a similar problem. |
Beta Was this translation helpful? Give feedback.
-
Hey @joepetrillo I am pretty sure this will fix the issue try later in a separate branch, will update if this fixes the issue
EDIT: It worked |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
😂😂😂 Every now and then, I get emails from this thread and laugh at people saying At the time, I had tried every single "solution" proposed here and was still bothered by the error several times a day. To the point that I've built a relationship with it. I could feel it coming like It's been too long, it must be right at the corner. With time, I would look at it as a being, an entity, that just wants to live and do its thing. So I accepted it, as it is. When it would pop up, instead of shouting My conclusion: this entity is an ordeal sent by the gods of web dev. It is meant to test your resilience and let you prove your dedication to the work. Don't fight it, embrace it. Once you've achieved that, the gods will welcome you within the gates of the error-free haven. It's a process though. Even with these method and mindset, the entity will still come back like once a week, as a reminder of the lessons learned along the way and to further test you. Usually, a simple greet and a refresh of the page will make it go away for another week. And eventually, with patience, you'll make it to the haven. Peace to you all, my brothers and sisters in arms! I'll see you here soon. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi all, I've faced the same problem working with Turbo, Next.js 15, and React 19. Here's how I fixed it: My Initial SetupIn my {
"dependencies": {
...
"next": "15.0.3",
"react": "19.0.0-rc-b01722d5-20241114",
"react-dom": "19.0.0-rc-b01722d5-20241114"
}
} In my {
"peerDependencies": {
"next": "14.x.x || 15.x.x",
"react": ">= 18",
"react-dom": ">= 18",
"tailwindcss": "^3.4.14"
}
} The issue was a version mismatch between the peerDependencies in my To fix it, I updated the peerDependencies in {
"peerDependencies": {
- "next": "14.x.x || 15.x.x",
- "react": ">= 18",
- "react-dom": ">= 18",
+ "next": "15.0.3",
+ "react": "19.0.0-rc-b01722d5-20241114",
+ "react-dom": "19.0.0-rc-b01722d5-20241114"
},
} Hopefully, this might help someone who is facing the same issue. 🙂 |
Beta Was this translation helpful? Give feedback.
-
Same issue here, but I found only it happens inside of a I tried with: I initialised in standalone folder it worked perfectly fine. |
Beta Was this translation helpful? Give feedback.
-
In my case, meditating on tomatoes worked. The issue is gone. |
Beta Was this translation helpful? Give feedback.
-
It worked for me after removing |
Beta Was this translation helpful? Give feedback.
-
I found a solid solution that works well for me on all Next.js apps and versions.Steps to Fix the Error
If this works (it has worked for me in all cases so far, though the file may differ between production and development environments), proceed to automate the fix.
Example package.json{ Post-Install Script: patchNodeModule.js
|
Beta Was this translation helpful? Give feedback.
-
Happening to me now too also on 14.2.18. Found the fix though - you just need to delete the entire project and the error goes away. |
Beta Was this translation helpful? Give feedback.
-
I ran into this issue in a monorepo where multiple versions of react were specified between different apps/packages. It turns out the issue having those multiple versions available. In this monorepo we're using npm as the package manager with the I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
The same error, I use
|
Beta Was this translation helpful? Give feedback.
-
My issue was seemingly caused by version mismatches in subdependencies. When I ran I tried When I re-ran
And builds worked after this. |
Beta Was this translation helpful? Give feedback.
-
Verify canary release
Provide environment information
Which area of Next.js is affected? (leave empty if unsure)
Other
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/splashsaver/splashsaver.com
To Reproduce
yarn install
.yarn build
.Describe the Bug
Whenever I try to build my Turborepo project I get the following error.
TypeError: Cannot read properties of null (reading 'useContext')
More info:
I get the same error in my
web
app but with the respective paths, thedocs
app builds successfully.When I run the Turborepo project locally the page returns an
Internal Server Error
message and I get the following error.TypeError: Cannot read properties of null (reading 'useReducer')
Expected Behavior
Successful builds.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Beta Was this translation helpful? Give feedback.
All reactions