Closed sarkistlt closed 6 years ago
Getting a similar error running next build
after upgrading to next@6.0.4-canary.4 or higher
Issue seems to come from removing the uglify compress options in zeit/next.js#4536, and can be temporarily fixed by reverting the changes in that PR
Looks like error message getting mangled from parallel: true
in the uglifyjs options.
After setting it to parallel: false
my error becomes:
> Failed to build
{ Error: (client) ... from UglifyJs
TypeError: sym.definition is not a function
...
If you're using yarn, I was able to fix it using the solution from mishoo/UglifyJS2#2896:
Add to package.json
:
...
"resolutions": {
"uglify-es": "3.3.9"
},
...
And run yarn install
again
...
"resolutions": {
"uglify-es": "3.3.9"
},
...
didn't help, getting the same error
Fixed by #4749
Bug report
Describe the bug
when running
next export
, it does export, it works, but then process never dies, so I'm forced to use something likenext export& sleep 300 ; kill $!
in my deployment which is not really reliable. I'm not usinggetInitialProps
anywhere besides_document.js
.Current version of nextjs is next@6.0.4-canary.3. I was trying to upgrade nextjs, hopping maybe this issue will be resolved, but If I will upgrade to next@6.0.4-canary.4 and up, getting following error when running next build:
To Reproduce
NODE_ENV=production next build && next export
Expected behavior
after export is complete process should stop.
System information
Additional context
package.json
.babelrc.js
ref: [next export getting stuck, #2201]