#Issues while compiling
31 messages · Page 1 of 1 (latest)
You have a runtime error - JavaScript error
TypeError means that something was not the right time at runtime
Something webpack expected to be an object was null
I guess this is during a production build of next? I hope next doesn't use webpack in dev
i launched this on dev build
Again, what does your code look like?
Looks like a messy diseaster.
This is during "next build"
Alright
Looks to me like an error requiring inside AccountModal.tsx, so you could show that file
The issue may be in your code, so only seeing error messages and webpack code is not helpful
and useContext would come from react, so maybe a problem importing react
.
🤷🏻♂️
oh yeah my bad i was trying to figure this out by myself with my peanut brains
Show Retsam some* code
Really though you shouldn't be getting these sorts of errors, because TS etc should be picking them up in your IDE. So I just wonder what your setup is.
Eh Visual Studio Code
Like if you have a broken or missing import TypeScript should be giving you red squiggles
Only the accountmodal? error occurs in multiple files.
could it be possible that ive installed the wrong versions of nodejs + react?
I mean next comes with react. Did you make a next project then add react on top?
It's not a node version issue
Anyway, I'm fairly sure that you have something quite broken going on
But it's pure guesswork without seeing code and package.json
and/or info on what you're doing/have done
If it was a new project then seems like you'd hit the error and know what the cause was because you just added it. So I figure you've converted a JS project to TS
but then it's a runtime error, and so if it worked before, would expect it work now
Unless you changed something in the switch which broken it, but the still leaves the question of why TS doesn't pick it up.