Getting prerender-error for next build on fresh project
Unanswered
Great Skua posted this in #help-forum
Great SkuaOP
Hey there 🙂
I am somewhat new to Next, and wanted to build my application to see if it would build, and got a bunch of prerender-error's.
So I tried to create a fresh next project on 14.2.5, with the following command:
And immediatly get the same errors as i did in my actual app:
I trimmed these parts:
Is this a bug, or am i simply doing something absolutely wrong?
I am somewhat new to Next, and wanted to build my application to see if it would build, and got a bunch of prerender-error's.
So I tried to create a fresh next project on 14.2.5, with the following command:
npx create-next-app@latest my-app --typescript
cd my-app
next buildAnd immediatly get the same errors as i did in my actual app:
Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
> Export encountered errors on following paths:
/_error: /404
/_error: /500
/_not-found/page: /_not-found
/page: /I trimmed these parts:
TypeError: Cannot read properties of null (reading 'useContext') since they are all throughout the error.Is this a bug, or am i simply doing something absolutely wrong?