Really obscure TypeError when starting Next.js

I have zero clue what's causing this but i just cloned my project on my mac after having developed it on windows for some time and i literally can't start the dev server due to this error, none of my pages load, and if i do not resolve this I will not meet the project deadline. here's a hastebin because discord bad https://hasteb.in/F3PcqE4BWtMopGQ
Solution:
If that fails, try using npm, yarn, etc.
Jump to solution
7 Replies
GetPsyched
GetPsyched10mo ago
Researched this error a little Turns out it's either due to node_modules or the use of pnpm Try deleting node_modules and running pnpm i
Solution
GetPsyched
GetPsyched10mo ago
If that fails, try using npm, yarn, etc.
mey
meyOP10mo ago
cool, thanks. not in the next server but i guess i’ll just use yarn since i already tried purging node_modules.
mey
meyOP9mo ago
Bumping this since i just got back to work on this project after a few weeks of inactivity. For anyone reading after the fact this issue is not with pnpm. I also experienced it just now with npm. I've removed the packageManager field from package.json and purged my node_modules. I'm now reinstalling with yarn and yet again i have the same error. how do i unmark the solution because that clearly wasn't it. for the record i have had zero issues with this on windows but on my mac it just doesn't fucking work oh wait yeah no it finally worked. remove node_modules, get rid of the stupid corepack field and yarn && yarn dev and it's good pnpm, wtf?
GetPsyched
GetPsyched9mo ago
lol, don't know why it happened, but glad it got resolved
mey
meyOP9mo ago
oh well. shit happens i guess, it’s webdev
Want results from more Discord servers?
Add your server