Error In Runtime From Terser During Build --prod
I have updated everything Angular and am now getting the error below (4x) when I
"Build --prod"
No errors if I remove --prod
I have no real code in this app. It is just a starter shell.
Any suggestions on what to look into?
ERROR in runtime.82c6613acef8f7246fe8.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:51:3)
at process.emit (events.js:197:13)
at emit (internal/child_process.js:828:12)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
My current Version
Angular CLI: 7.3.0
Node: 11.8.0
OS: darwin x64
Angular: 7.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0
@angular-devkit/build-angular 0.13.0
@angular-devkit/build-optimizer 0.13.0
@angular-devkit/build-webpack 0.13.0
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 7.3.0
@angular/pwa 0.6.8
@ngtools/webpack 7.3.0
@schematics/angular 0.6.8
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0
angular webpack angular-cli
add a comment |
I have updated everything Angular and am now getting the error below (4x) when I
"Build --prod"
No errors if I remove --prod
I have no real code in this app. It is just a starter shell.
Any suggestions on what to look into?
ERROR in runtime.82c6613acef8f7246fe8.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:51:3)
at process.emit (events.js:197:13)
at emit (internal/child_process.js:828:12)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
My current Version
Angular CLI: 7.3.0
Node: 11.8.0
OS: darwin x64
Angular: 7.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0
@angular-devkit/build-angular 0.13.0
@angular-devkit/build-optimizer 0.13.0
@angular-devkit/build-webpack 0.13.0
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 7.3.0
@angular/pwa 0.6.8
@ngtools/webpack 7.3.0
@schematics/angular 0.6.8
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0
angular webpack angular-cli
Note: Running this works "ng build --prod --optimization=false"
– Mathias
4 hours ago
1
I've encountered the same issue like 20 minutes ago. The problem was that I had removedpackage-lock.jsonfile.
– Nuurek
4 hours ago
Thanks @Nuurek. Unfortunately, mine is there. And I did a npm Install just to try and rebuild it.
– Mathias
4 hours ago
add a comment |
I have updated everything Angular and am now getting the error below (4x) when I
"Build --prod"
No errors if I remove --prod
I have no real code in this app. It is just a starter shell.
Any suggestions on what to look into?
ERROR in runtime.82c6613acef8f7246fe8.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:51:3)
at process.emit (events.js:197:13)
at emit (internal/child_process.js:828:12)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
My current Version
Angular CLI: 7.3.0
Node: 11.8.0
OS: darwin x64
Angular: 7.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0
@angular-devkit/build-angular 0.13.0
@angular-devkit/build-optimizer 0.13.0
@angular-devkit/build-webpack 0.13.0
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 7.3.0
@angular/pwa 0.6.8
@ngtools/webpack 7.3.0
@schematics/angular 0.6.8
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0
angular webpack angular-cli
I have updated everything Angular and am now getting the error below (4x) when I
"Build --prod"
No errors if I remove --prod
I have no real code in this app. It is just a starter shell.
Any suggestions on what to look into?
ERROR in runtime.82c6613acef8f7246fe8.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:51:3)
at process.emit (events.js:197:13)
at emit (internal/child_process.js:828:12)
at processTicksAndRejections (internal/process/next_tick.js:76:17)
My current Version
Angular CLI: 7.3.0
Node: 11.8.0
OS: darwin x64
Angular: 7.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0
@angular-devkit/build-angular 0.13.0
@angular-devkit/build-optimizer 0.13.0
@angular-devkit/build-webpack 0.13.0
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 7.3.0
@angular/pwa 0.6.8
@ngtools/webpack 7.3.0
@schematics/angular 0.6.8
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0
angular webpack angular-cli
angular webpack angular-cli
edited 4 hours ago
Mathias
asked 5 hours ago
MathiasMathias
6241513
6241513
Note: Running this works "ng build --prod --optimization=false"
– Mathias
4 hours ago
1
I've encountered the same issue like 20 minutes ago. The problem was that I had removedpackage-lock.jsonfile.
– Nuurek
4 hours ago
Thanks @Nuurek. Unfortunately, mine is there. And I did a npm Install just to try and rebuild it.
– Mathias
4 hours ago
add a comment |
Note: Running this works "ng build --prod --optimization=false"
– Mathias
4 hours ago
1
I've encountered the same issue like 20 minutes ago. The problem was that I had removedpackage-lock.jsonfile.
– Nuurek
4 hours ago
Thanks @Nuurek. Unfortunately, mine is there. And I did a npm Install just to try and rebuild it.
– Mathias
4 hours ago
Note: Running this works "ng build --prod --optimization=false"
– Mathias
4 hours ago
Note: Running this works "ng build --prod --optimization=false"
– Mathias
4 hours ago
1
1
I've encountered the same issue like 20 minutes ago. The problem was that I had removed
package-lock.json file.– Nuurek
4 hours ago
I've encountered the same issue like 20 minutes ago. The problem was that I had removed
package-lock.json file.– Nuurek
4 hours ago
Thanks @Nuurek. Unfortunately, mine is there. And I did a npm Install just to try and rebuild it.
– Mathias
4 hours ago
Thanks @Nuurek. Unfortunately, mine is there. And I did a npm Install just to try and rebuild it.
– Mathias
4 hours ago
add a comment |
2 Answers
2
active
oldest
votes
It seems to be a problem with the recently released version 3.16 of Terser, here's the related issue in Terser and in Terser as a Webpack plugin.
In this VueJS issue they recommended to downgrade it to version 3.14.1. You can do it looking for the line in package.json containing "terser" and pin it as follows:
"terser": "^3.14.1",
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
1
We had to pin it inpackage.jsonindependenciesas follows:"terser": "^3.14.1". I think by default it pulls the latest version.
– Pietro Saccardi
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
add a comment |
As Pietro Saccardi said, by now, it's necessary to fix the Terser version to 3.14.1 in the package.json as follows:
"terser": "3.14.1"
Don't use the ^ in the version or it could upgrade to 3.16.
Thank you @Kazu
– Mathias
3 hours ago
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54497782%2ferror-in-runtime-from-terser-during-build-prod%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
It seems to be a problem with the recently released version 3.16 of Terser, here's the related issue in Terser and in Terser as a Webpack plugin.
In this VueJS issue they recommended to downgrade it to version 3.14.1. You can do it looking for the line in package.json containing "terser" and pin it as follows:
"terser": "^3.14.1",
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
1
We had to pin it inpackage.jsonindependenciesas follows:"terser": "^3.14.1". I think by default it pulls the latest version.
– Pietro Saccardi
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
add a comment |
It seems to be a problem with the recently released version 3.16 of Terser, here's the related issue in Terser and in Terser as a Webpack plugin.
In this VueJS issue they recommended to downgrade it to version 3.14.1. You can do it looking for the line in package.json containing "terser" and pin it as follows:
"terser": "^3.14.1",
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
1
We had to pin it inpackage.jsonindependenciesas follows:"terser": "^3.14.1". I think by default it pulls the latest version.
– Pietro Saccardi
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
add a comment |
It seems to be a problem with the recently released version 3.16 of Terser, here's the related issue in Terser and in Terser as a Webpack plugin.
In this VueJS issue they recommended to downgrade it to version 3.14.1. You can do it looking for the line in package.json containing "terser" and pin it as follows:
"terser": "^3.14.1",
It seems to be a problem with the recently released version 3.16 of Terser, here's the related issue in Terser and in Terser as a Webpack plugin.
In this VueJS issue they recommended to downgrade it to version 3.14.1. You can do it looking for the line in package.json containing "terser" and pin it as follows:
"terser": "^3.14.1",
edited 3 hours ago
answered 3 hours ago
Pietro SaccardiPietro Saccardi
1,9042331
1,9042331
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
1
We had to pin it inpackage.jsonindependenciesas follows:"terser": "^3.14.1". I think by default it pulls the latest version.
– Pietro Saccardi
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
add a comment |
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
1
We had to pin it inpackage.jsonindependenciesas follows:"terser": "^3.14.1". I think by default it pulls the latest version.
– Pietro Saccardi
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
Thanks @pietro. I'll go look at that. I don't THINK I am setting the Terser version anywhere in my Angular config. I think that is pulled in from webpack. So let me go play.
– Mathias
3 hours ago
1
1
We had to pin it in
package.json in dependencies as follows: "terser": "^3.14.1". I think by default it pulls the latest version.– Pietro Saccardi
3 hours ago
We had to pin it in
package.json in dependencies as follows: "terser": "^3.14.1". I think by default it pulls the latest version.– Pietro Saccardi
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
Thank you @Pietro! That seems to have worked. I added "terser": "3.14.1" to my dependencies (no caret on mine), npm install, then the build with --prod worked.
– Mathias
3 hours ago
add a comment |
As Pietro Saccardi said, by now, it's necessary to fix the Terser version to 3.14.1 in the package.json as follows:
"terser": "3.14.1"
Don't use the ^ in the version or it could upgrade to 3.16.
Thank you @Kazu
– Mathias
3 hours ago
add a comment |
As Pietro Saccardi said, by now, it's necessary to fix the Terser version to 3.14.1 in the package.json as follows:
"terser": "3.14.1"
Don't use the ^ in the version or it could upgrade to 3.16.
Thank you @Kazu
– Mathias
3 hours ago
add a comment |
As Pietro Saccardi said, by now, it's necessary to fix the Terser version to 3.14.1 in the package.json as follows:
"terser": "3.14.1"
Don't use the ^ in the version or it could upgrade to 3.16.
As Pietro Saccardi said, by now, it's necessary to fix the Terser version to 3.14.1 in the package.json as follows:
"terser": "3.14.1"
Don't use the ^ in the version or it could upgrade to 3.16.
answered 3 hours ago
KazuKazu
515
515
Thank you @Kazu
– Mathias
3 hours ago
add a comment |
Thank you @Kazu
– Mathias
3 hours ago
Thank you @Kazu
– Mathias
3 hours ago
Thank you @Kazu
– Mathias
3 hours ago
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54497782%2ferror-in-runtime-from-terser-during-build-prod%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Note: Running this works "ng build --prod --optimization=false"
– Mathias
4 hours ago
1
I've encountered the same issue like 20 minutes ago. The problem was that I had removed
package-lock.jsonfile.– Nuurek
4 hours ago
Thanks @Nuurek. Unfortunately, mine is there. And I did a npm Install just to try and rebuild it.
– Mathias
4 hours ago