-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Closed
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.
Description
What version of Next.js are you using?
10.2.3
What version of Node.js are you using?
14+
What browser are you using?
Chrome
What operating system are you using?
macOs
How are you deploying your application?
next start
Describe the Bug
After updating from 10.1.3 to 10.2.3 and script execution NODE_ENV=development npm run build (=> next build)
the following error appears:
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data
[== ] info - Generating static pages (0/4)
Error occurred prerendering page "/en/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot assign to read only property 'children' of object '#<Object>'
(...)
> Build error occurred
Error: Export encountered errors on following paths:
/de/404
/de/500
/en/404
/en/500
When executing the same script with NODE_ENV=production npm run build
everything works as expected.
Downgrading next to 10.1.3 resolves the issue.
Why do I need to set NODE_ENV? Several configuration options depend on the NODE_ENV. For exmaple in development
a different backend url and DB is being accessed etc.
Expected Behavior
NODE_ENV=development next build
works as it did in 10.1.3
To Reproduce
NODE_ENV=development next build
Building static 404 and 500 pages fails...
flybayer and GarryOne
Metadata
Metadata
Assignees
Labels
bugIssue was opened via the bug report template.Issue was opened via the bug report template.