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
Nuxt build failing due to Terser #4931
Comments
backtrace: ERROR in 70fe8ac2e7db24c37f38.js from Terser terser is accessed via ".default".. which is not defined though. If you change the line to (/home/simon/Dev/Web/hokify-pwa/node_modules/terser-webpack-plugin/dist/minify.js:175)
thinks work again.. |
Adding "resolutions": {
"terser": "3.14.1"
} to |
Similarly, hardcoding a dependency in my package.json worked for npm.
"dependencies":{
...
"terser": "3.14.1"
}
…On Sat, 2 Feb 2019, 19:08 Marco Ehrenmann ***@***.*** wrote:
Adding
"resolutions": {
"terser": "3.14.1"
}
to package.json helped me to successfully $ yarn build until this is
fixed.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4931 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AGKQ68E-_fV6f9NG2jrVs7Bw4k175eokks5vJeIlgaJpZM4afsTd>
.
|
@stepbeek Can you use |
Related: vuejs/vue-cli#3407 |
Thanks @mauxtin. Fix on his way : terser/terser#254 But the issue it not around Nuxt dependencies, it's around a module/option selected through But I can't easily find which one, I would need someone with the issue to do |
@kevinmarrec |
@marcoeh Yeah thanks, just got that from
|
I have the same issue! But with my current app, after I build it. I updated Nuxt and now I have this
And I also have font loader errors. |
None of the mentioned solutions work for me, I just started an app with
Edit: I was able to work around this by editing my yarn.lock file to resolve to the older version. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@bdrtsk If it will take 15 minutes, raise a PR yourself. |
Even better, it's already in progress 😃 |
@robcresswell yeah, PR 😄 It doesn't merged, that's the whole point. It's in progress for a 2 days already. @marcoeh so? Let's break everything and then tell about personal life? If whole webpack ecosystem depends on that module, then why he's the only one who reviews PR's. You really think this is normal? |
After watching Vuemastery tutorial about Nut I am trying to run |
@pavlushacoder that's an unfortunate first experience. I suggest you to wait a fix and then try again. |
The root of problem is Terser, most if not all packages that depends on Terser have their build broken, Nuxt isn't the only one. A quick fix is to downgrade Terser's version by adding |
This is funny, since I also just tried to install Nuxt for the first time 😄 |
@HoraceKeung did you tried it? We don't have Terser as dependency. This is dependency of dependency. |
Sorry, I should have said it better, Nuxt does not directly depend on Terser, but Nuxt depends on something that depends on Terser. I had the same issue on Saturday, spent 2-3 hours looking for a fix, then I see Terser released 3.16.0 on Saturday (https://www.npmjs.com/package/terser), after reading a bit more, I tried adding |
The problem is he should have make it a major release i.e. make it version 4.0.0 then I believe none of these will happen. |
Okay, we got it. Now calm down everybody 😉 A few things you guys should consider:
TL;DR
|
terser/terser#251 / https://www.npmjs.com/package/terser/v/3.16.1 Terser |
try this ? i resolved |
Version
v2.4.2
Reproduction link
https://github.com/nuxt/create-nuxt-app
Steps to reproduce
Create a new project using npx and try to build.
What is expected ?
A successful build.
What is actually happening?
Build fails with error:
ERROR in baa9a7368c0a13e03198.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/usr/src/app/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
Additional comments?
It looks like this is an upstream issue. After some time spent trying to figure out why my build was failing and not seeing any issues here, I figured I would open one with the link to what I believe the cause to be: webpack-contrib/terser-webpack-plugin#66
Hopefully some other dev is saved some debug time!
The text was updated successfully, but these errors were encountered: