npm run build throws error
See original GitHub issueVersion
3.4.0
Reproduction link
https://github.com/ErikRobles/vue-to-do
Environment info
Environment Info:
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz
Binaries:
Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 42.17134.1.0
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.6.1 => 2.6.1
vue-eslint-parser: 2.0.3
vue-hot-reload-api: 2.3.1
vue-loader: 15.6.2
vue-router: ^3.0.1 => 3.0.2
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.1 => 2.6.1
vue-template-es2015-compiler: 1.8.2
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
run: npm run build after installing npm install
What is expected?
dist folder and correlating files created
What is actually happening?
various errors
Debug:
0 info it worked if it ends with ok
1 verbose cli [ ‘C:\Program Files\nodejs\node.exe’,
1 verbose cli ‘C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘run’,
1 verbose cli ‘build’ ]
2 info using npm@6.4.1
3 info using node@v10.15.1
4 verbose run-script [ ‘prebuild’, ‘build’, ‘postbuild’ ]
5 info lifecycle vue_todolist@0.1.0~prebuild: vue_todolist@0.1.0
6 info lifecycle vue_todolist@0.1.0~build: vue_todolist@0.1.0
7 verbose lifecycle vue_todolist@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle vue_todolist@0.1.0~build: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\erikj\Desktop\vue_todolist\node_modules.bin;C:\Users\erikj\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\local\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\usr\bin;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Users\erikj\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\Brackets\command;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\nodejs;C:\Users\erikj.windows-build-tools\python27;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\erikj\AppData\Roaming\npm\node_modules\windows-build-tools\node_modules.bin;C:\Users\erikj\AppData\Roaming\npm\node_modules.bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\Program Files\nodejs;C:\xampp\php;C:\ProgramData\ComposerSetup\bin;C:\Program Files (x86)\Brackets\command;C:\Program Files\Microsoft VS Code\bin;C:\Users\erikj\AppData\Local\Microsoft\WindowsApps;C:\Users\erikj\AppData\Local\atom\bin;C:\Users\erikj\AppData\Roaming\Composer\vendor\bin;C:\Users\erikj\AppData\Roaming\npm;C:\Program Files\Git\usr\bin\vendor_perl;C:\Program Files\Git\usr\bin\core_perl
9 verbose lifecycle vue_todolist@0.1.0~build: CWD: C:\Users\erikj\Desktop\vue_todolist
10 silly lifecycle vue_todolist@0.1.0~build: Args: [ ‘/d /s /c’, ‘vue-cli-service build’ ]
11 silly lifecycle vue_todolist@0.1.0~build: Returned: code: 1 signal: null
12 info lifecycle vue_todolist@0.1.0~build: Failed to exec build script
13 verbose stack Error: vue_todolist@0.1.0 build: vue-cli-service build
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid vue_todolist@0.1.0
15 verbose cwd C:\Users\erikj\Desktop\vue_todolist
16 verbose Windows_NT 10.0.17134
17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “build”
18 verbose node v10.15.1
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error vue_todolist@0.1.0 build: vue-cli-service build
22 error Exit status 1
23 error Failed at the vue_todolist@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
According to the
package-lock.json
, you have terser 3.16.0 installed. This problem has been addressed in this issue https://github.com/vuejs/vue-cli/issues/3407 So please deletepackage-lock.json
&node_modules
and then rerunnpm install
andnpm run build
.help me
when i run
npm run serve
i got these errors , and yes i delete node_modules and package-lock.json but it did not work