#Issues while compiling

31 messages · Page 1 of 1 (latest)

hidden juniper
#

What does your code look like?

quaint ether
#

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

hidden juniper
#

Again, what does your code look like?

hollow edge
#

This is during "next build"

quaint ether
#

Looks to me like an error requiring inside AccountModal.tsx, so you could show that file

hidden juniper
#

The issue may be in your code, so only seeing error messages and webpack code is not helpful

quaint ether
#

and useContext would come from react, so maybe a problem importing react

hollow edge
#

oh yeah my bad i was trying to figure this out by myself with my peanut brains

quaint ether
#

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.

quaint ether
#

Like if you have a broken or missing import TypeScript should be giving you red squiggles

hollow edge
hollow edge
quaint ether
#

I mean next comes with react. Did you make a next project then add react on top?

#

It's not a node version issue

hollow edge
quaint ether
#

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.