-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
TypeError: Cannot read property 'javascript' of undefined #335
Comments
encountered the same problem, i am building my typescript babel react project. i use v4.2.3 of terser-webpack-plugin, it builds successfully |
@Jerry-zhk why need to spam? |
Because |
I'm not using webpack 4 but webpack 5. |
Please take a look at my initial post. You asked how do we reproduce? I answered : Update version of webpack & terser to latest then make build of assets of project : https://github.com/oguilleux/webpack-gulp-wordpress-starter-theme So if you update package.json to webpack 5.1.2 and terser-webpack-plugin to 5.0.0 and make the build you will reproduce the bug. |
|
Okay thanks for highlighting this ! |
Solved by updating my gulp pipe and passing webpack in webpack-steam as you can see here. Now I have this showing up :
It seems similar to this issue though my build doesn't fail. I'll wait for your PR. |
@oguilleux yep, we are working on it, release with fix will be today/tomorrow |
Any news? Still having this issue with 5.0.3 |
@Tofandel seriously? Please read the CHANGELOG |
This happenend to me with Webpack5.15.0 and Terser5.5.1 |
This is by far one of the funniest GitHub issues i've seen. |
Don't know why a lot of 👎 I don’t know where it’s so much negative in people, even more using emoji in these case is not help somebody, if you faced with a problem please provide information, so I can help you, thanks |
If you are using webpack v5 or above you do not need to install this plugin. Webpack v5 comes with the latest terser-webpack-plugin out of the box. Using Webpack v4, you have to install terser-webpack-plugin v4. |
@tomatobybike You do if you want to override its settings. |
@alexander-akait you are getting a lot of thumbs down because you are not being pleasant in your responses. Instead of getting exasperated the first time someone asks a question and saying, "Seriously?! RTFM!!!" try exercising a little more patience and empathy. I understand you are dealing with a lot more than just this one GitHub issue, but one comment here isn't spam. I'm trying to be nothing but honest and helpful here as I've sent my fair share of online messages that I regret. ✌ |
@as-zlynn-philipps I don't say any angry word, just ask a question and answer there was problem, even more I describe the problem and there it should be fixed #335 (comment), that problem #335 (comment) is not helpful, it was clear from the first message, sometimes I can't just take and immediately answer what the problem is, but I did it the next day |
Expected Behavior
Build doesn't fail
Actual Behavior
Build fails with :
TypeError: Cannot read property 'javascript' of undefined at /node_modules/terser-webpack-plugin/dist/index.js:366:38
Code
My config :
How Do We Reproduce?
Update version of webpack & terser to latest then make build of assets of project : https://github.com/oguilleux/webpack-gulp-wordpress-starter-theme
The text was updated successfully, but these errors were encountered: