question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

npm run build throws error

See original GitHub issue

Version

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:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
sodateacommented, Feb 5, 2019

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 delete package-lock.json & node_modules and then rerun npm install and npm run build.

0reactions
Dellcashcommented, May 25, 2021

0 info it worked if it ends with ok 1 verbose cli [ 1 verbose cli ‘C:\Program Files (x86)\nodejs\node.exe’, 1 verbose cli ‘C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js’, 1 verbose cli ‘run’, 1 verbose cli ‘serve’ 1 verbose cli ] 2 info using npm@6.14.12 3 info using node@v12.22.1 4 verbose run-script [ ‘preserve’, ‘serve’, ‘postserve’ ] 5 info lifecycle vue-first-app@0.1.0~preserve: vue-first-app@0.1.0 6 info lifecycle vue-first-app@0.1.0~serve: vue-first-app@0.1.0 7 verbose lifecycle vue-first-app@0.1.0~serve: unsafe-perm in lifecycle true 8 verbose lifecycle vue-first-app@0.1.0~serve: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\Udemy - Vue - The Complete Guide (w Router, Vuex, Composition API) 2020-12\7. Moving to a Better Development Setup & Workflow with the Vue CLI\vue-cli-01-a-new-vue-project\node_modules.bin;C:\Program Files\nodejs folder;C:\Program Files (x86)\nodejs;C:\Program Files\Microsoft VS Code\bin;C:\Users\Dellcash\AppData\Roaming\npm;C:\MinGW\bin;C:\Windows\System32 9 verbose lifecycle vue-first-app@0.1.0~serve: CWD: E:\Udemy - Vue - The Complete Guide (w Router, Vuex, Composition API) 2020-12\7. Moving to a Better Development Setup & Workflow with the Vue CLI\vue-cli-01-a-new-vue-project 10 silly lifecycle vue-first-app@0.1.0~serve: Args: [ ‘/d /s /c’, ‘vue-cli-service serve’ ] 11 silly lifecycle vue-first-app@0.1.0~serve: Returned: code: 1 signal: null 12 info lifecycle vue-first-app@0.1.0~serve: Failed to exec serve script 13 verbose stack Error: vue-first-app@0.1.0 serve: vue-cli-service serve 13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:314:20) 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:314:20) 13 verbose stack at maybeClose (internal/child_process.js:1022:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) 14 verbose pkgid vue-first-app@0.1.0 15 verbose cwd E:\Udemy - Vue - The Complete Guide (w Router, Vuex, Composition API) 2020-12\7. Moving to a Better Development Setup & Workflow with the Vue CLI\vue-cli-01-a-new-vue-project 16 verbose Windows_NT 6.1.7601 17 verbose argv “C:\Program Files (x86)\nodejs\node.exe” “C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-cli.js” “run” “serve” 18 verbose node v12.22.1 19 verbose npm v6.14.12 20 error code ELIFECYCLE 21 error errno 1 22 error vue-first-app@0.1.0 serve: vue-cli-service serve 22 error Exit status 1 23 error Failed at the vue-first-app@0.1.0 serve script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors when running npm run build - node.js - Stack Overflow
Im trying to create my built folder for a react project, but I get this error when I run the command 'npm run...
Read more >
Execution of "npm run build" causes an error and can not be ...
I purchased Material Dashboard Pro React.(material-dashboard-pro-react@1.2.0) Execution of "npm run build" causes an error and can not be ...
Read more >
Common errors | npm Docs
Possible temporary npm registry glitch, or corrupted local server cache. Run npm cache clean and/or try again later. · This can be caused...
Read more >
Error when running npm run build : r/react - Reddit
I have a react app done and am attempting to learn how to deploy it for the first time. I type npm run...
Read more >
"The NPM script 'start' exited without indicating that the create ...
From the error message, it seems that the react-scripts.js module was not found, try to check the package.json file whether it contains the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found