-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad next build
when using new JSX transform & NODE_ENV=development
#19001
Comments
It sounds like Next.js is accidentally allowing you to configure |
I was having a similar issue resulting in the following error when building:
Setting |
I've encountered some related issues when using NODE_ENV=test in conjunction with Here is a reproduction repo: https://github.com/matthewdavidson/nextjs-nodenv-test-repro Downgrading react 17 to 16 fixes @AsherFoster's original issue, but a separate issue exists with IE11 support: The generated output from a |
This PR fixes a bug where `next/babel` would accidentally enable development transforms for a production build (`next build`). --- Fixes vercel#18929 Fixes vercel#19001 x-ref vercel#19046
This PR fixes a bug where `next/babel` would accidentally enable development transforms for a production build (`next build`). --- Fixes vercel#18929 Fixes vercel#19001 x-ref vercel#19046
This PR fixes a bug where `next/babel` would accidentally enable development transforms for a production build (`next build`). --- Fixes vercel#18929 Fixes vercel#19001 x-ref vercel#19046
This PR fixes a bug where `next/babel` would accidentally enable development transforms for a production build (`next build`). This is tested by the two updated unit tests (which removed a workaround for this bug, and one now properly enables dev transforms). --- Fixes #18929 Fixes #19001 x-ref #19046 x-ref #17032
worked for me, export NODE_ENV=test, before NODE_ENV=production |
This is broken again with latest react, react-dom , and nextjs. I downgraded to the ver in that repo and now its fixed. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
When creating a production build in development (Weird use case, I know, but I use this to test a compiled app with development settings), next appears to be confused about whether to use jsx or jsxDEV.
The app appears to have SSG rendered fine (I get a brief flash of content,) however when hydration is triggered on the client, the #__next div is emptied, and an infinite error loop occurs. Thousands of
TypeError: Object(...) is not a function
(Object(o.jsxDEV)(...)
in source) errors appear in the console.I don't know how next handles the JSX transform, but my guess is
next build
doesn't includejsxDEV
on the client, somehow breaking the app.Full trace
Compiled source:
To Reproduce
Pretty straightforward to reproduce:
npx create-next-app jsxdev-repro cd jsxdev-repro NODE_ENV=development npm run build npm start
Open site in a browser
Expected behavior
Screenshots
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: