-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Next.js + Antd not building correctly on deploy #6194
Comments
I just ran into this during a build as well. A new version of terser was released 2 hours ago. I wonder if that introduced a breaking change, because my build command worked fine yesterday and nothing has changed in my setup. |
That's interesting @mitchdowney. I've asked if it's related. Let's wait for any response. |
It seems to be related, check this conversation on Spectrum https://spectrum.chat/zeit/now/next-js-on-now-build-error~c73091bd-0141-4c3a-b8c1-3b8f7fa78298 |
terser bug terser/terser#251 which broke webpack. pls wait for it to be resolved |
Confirmed also have the same issue - this is not related to Antd. Hopefully the terser terser/terser#251 can be fixed speedily. |
UpdateBased on this workaround: vuejs/vue-cli#3407 (comment) Adding the following on your package.json will build correctly on deploy, until new release of terser patching this issue is out. "resolutions": {
"terser": "3.14.1"
}, |
Worked for me 👍 Based on the same issue comment |
The issue seems to be resolved as an official release from terser patched the errors. The issue can be closed now. |
See vuejs/vue-cli#3407 (comment)
Bug report
I've successfully configured a Next.js app integration with Antd following this guide. Everything works as expected on development. However, when deploying with Now, it throws an error on build process:
TypeError: Cannot read property 'minify' of undefined
Deployment Logs
To Reproduce
Install Dependencies:
next-less.config.js
next.config.js
now.json
utils/modifyVars.js
pages/index.js
Expected behavior
It should build correctly on production (now.sh).
System information
Additional info
I'm also getting FOUC using this method, but that's a topic for another issue.
Thanks in advance!
Updates
See: webpack-contrib/terser-webpack-plugin#66
The text was updated successfully, but these errors were encountered: