I'm developing a frontend for my API using Next JS and Typescript. I have made changes to the code that has caused this a Type Error to occur whenever I attempt to build, run in dev mode or lint.
Usually this would be fairly easy to debug - however the type error is not present in my own files but instead Next JS's:

Any help would be appreciated.
Thanks in advance!
The issue was caused by a version mismatch between react-dom and the other NextJS packages - I'd removed react-dom as a dependency as I was unaware that NextJS depended on it, so when it was added again it downloaded the latest version "^18.0.0" instead of "17.0.2".
Remove next and reinstall it. It will install the latest version of next and correct react version.
npm uninstall next
npm install next
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With