build error: TypeError: Cannot read property 'minify' of undefined
Version
3.4.0
Reproduction link
https://github.com/suwebdev/wats4000-templates-and-data/tree/cli3-migrate
Environment info
Environment Info:
System:
OS: macOS 10.14.2
CPU: (4) x64 Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
Binaries:
Node: 8.11.4 - /usr/local/bin/node
Yarn: Not Found
npm: 6.7.0 - /usr/local/bin/npm
Browsers:
Chrome: 71.0.3578.98
Firefox: 57.0.4
Safari: 12.0.2
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0-beta.2
@vue/babel-plugin-transform-vue-jsx: 1.0.0-beta.2
@vue/babel-preset-app: 3.4.0
@vue/babel-preset-jsx: 1.0.0-beta.2
@vue/babel-sugar-functional-vue: 1.0.0-beta.2
@vue/babel-sugar-inject-h: 1.0.0-beta.2
@vue/babel-sugar-v-model: 1.0.0-beta.2
@vue/babel-sugar-v-on: 1.0.0-beta.2
@vue/cli-overlay: 3.4.0
@vue/cli-plugin-babel: ^3.4.0 => 3.4.0
@vue/cli-plugin-eslint: ^3.4.0 => 3.4.0
@vue/cli-service: ^3.4.0 => 3.4.0
@vue/cli-shared-utils: 3.4.0
@vue/component-compiler-utils: 2.5.2
@vue/preload-webpack-plugin: 1.1.0
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.1.0
vue: ^2.5.22 => 2.5.22
vue-eslint-parser: 2.0.3
vue-hot-reload-api: 2.3.1
vue-loader: 15.6.2
vue-style-loader: 4.1.2
vue-template-compiler: ^2.5.21 => 2.5.22
vue-template-es2015-compiler: 1.8.2
npmGlobalPackages:
@vue/cli: 3.3.0
Steps to reproduce
npm run build
What is expected?
should build to my docs directory I have been using my config files successfully on previous days
What is actually happening?
build error: TypeError: Cannot read property 'minify' of undefined
Rebeccas-MacBook-Air:wats4000-templates-and-data becky$ npm run build
[email protected] build /Users/becky/projects/4000/wats4000-templates-and-data vue-cli-service build
⠴ Building for production...
ERROR Failed to compile with 2 errors 09:11:37
error
assets/js/app.ed82413e.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/becky/projects/4000/wats4000-templates-and-data/node_modules/terser-webpack-plugin/dist/minify.js:17
5:23)
at module.exports (/Users/becky/projects/4000/wats4000-templates-and-data/node_modules/terser-webpack-plugin/dist/work
er.js:13:40)
at handle (/Users/becky/projects/4000/wats4000-templates-and-data/node_modules/worker-farm/lib/child/index.js:44:8)
at process.
error
assets/js/chunk-vendors.76ce3e5a.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/becky/projects/4000/wats4000-templates-and-data/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/Users/becky/projects/4000/wats4000-templates-and-data/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/Users/becky/projects/4000/wats4000-templates-and-data/node_modules/worker-farm/lib/child/index.js:44:8)
at process.
ERROR Build failed with errors.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: vue-cli-service build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/becky/.npm/_logs/2019-02-02T17_11_37_442Z-debug.log Rebeccas-MacBook-Air:wats4000-templates-and-data becky$
NOTE: npm run serve works correctly
I've been using version 3.3 successfully for a few weeks. Is there an easy way to upgrade to 3.4 if 3.3 is the problem?
I tried creating a new test project with no new configs and got the same build error (minify) today.
Hi Rebecca!
Same problem here on Linux, in the #3407 issue.
npm run dev works properly for me as well :+1:
closed in favor of #3407