Next.js Discord

Discord Forum

I can't get a build

Unanswered
Hilsa shad posted this in #help-forum
Open in Discord
Hilsa shadOP
I encountered these errors during compilation

9 Replies

Dunker
Says your context is null, find useContext line in your app and check
@Dunker Says your context is null, find useContext line in your app and check
Giant panda
This isn't helpful at all, because the error very likely is throwing in Next-internal code. It's a completely different reason such as forgetting to default export layouts or pages which causes Next to trip up.
Hilsa shadOP
How can I solve the problem
Giant panda
such as forgetting to default export layouts or pages which causes Next to trip up.
Check that you didn't forget something that could this
@Hilsa shad How can I solve the problem
Dunker
first run app in dev mode, not build. with npm run dev
you mean run npm run build && npm run start? (which they are already doing)
Dunker
no we need to see dev logs, we dont need things in .next
im pretty sure the builder has better errors... but we can see ig
Dunker
why we need loggers