kenberkeley / vue-demo

Vue.js 示例项目 · 简易留言板。本项目拥有完善的文档说明与注释,让您快速上手 Vue.js 开发 SPA。Webpack / ES6 + Babel / Vue Router / (Vue Resource?) / (Vue Validator?) / (Vuex?) —— An Excellent Vue Starter with Best Practice / 最佳实践
https://kenberkeley.github.io/vue-demo/dist
Apache License 2.0
1.29k stars 411 forks source link

npm start Failed #15

Closed MillerFour closed 7 years ago

MillerFour commented 7 years ago

0 info it worked if it ends with ok 1 verbose cli [ 'E:\nodejs\node.exe', 1 verbose cli 'E:\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start' ] 2 info using npm@3.7.3 3 info using node@v5.9.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle vue-demo@0.1.0~prestart: vue-demo@0.1.0 6 silly lifecycle vue-demo@0.1.0~prestart: no script for prestart, continuing 7 info lifecycle vue-demo@0.1.0~start: vue-demo@0.1.0 8 verbose lifecycle vue-demo@0.1.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle vue-demo@0.1.0~start: PATH: E:\nodejs\node_modules\npm\bin\node-gyp-bin;E:\workspace\vue-demo-master\node_modules.bin;E:\nodejs;C:\ProgramData\Oracle\Java\javapath--;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\nodejs\;C:\Program Files\Java\jdk1.8.0_92\bin;C:\Program Files\Java\jdk1.8.0_92\jre\bin;C:\Users\Administrator\AppData\Roaming\npm;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps; 10 verbose lifecycle vue-demo@0.1.0~start: CWD: E:\workspace\vue-demo-master 11 silly lifecycle vue-demo@0.1.0~start: Args: [ '/d /s /c', 11 silly lifecycle 'cross-env NODE_ENV=development node build/dev.js' ] 12 silly lifecycle vue-demo@0.1.0~start: Returned: code: 1 signal: null 13 info lifecycle vue-demo@0.1.0~start: Failed to exec start script 14 verbose stack Error: vue-demo@0.1.0 start: cross-env NODE_ENV=development node build/dev.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (E:\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16) 14 verbose stack at emitTwo (events.js:100:13) 14 verbose stack at EventEmitter.emit (events.js:185:7) 14 verbose stack at ChildProcess. (E:\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 14 verbose stack at emitTwo (events.js:100:13) 14 verbose stack at ChildProcess.emit (events.js:185:7) 14 verbose stack at maybeClose (internal/child_process.js:850:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 15 verbose pkgid vue-demo@0.1.0 16 verbose cwd E:\workspace\vue-demo-master 17 error Windows_NT 10.0.14393 18 error argv "E:\nodejs\node.exe" "E:\nodejs\node_modules\npm\bin\npm-cli.js" "start" 19 error node v5.9.0 20 error npm v3.7.3 21 error code ELIFECYCLE 22 error vue-demo@0.1.0 start: cross-env NODE_ENV=development node build/dev.js 22 error Exit status 1 23 error Failed at the vue-demo@0.1.0 start script 'cross-env NODE_ENV=development node build/dev.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the vue-demo package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error cross-env NODE_ENV=development node build/dev.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs vue-demo 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls vue-demo 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

MillerFour commented 7 years ago

operation steps: 1.npm i cnpm 2.npm install cross-env --save-dev 3.npm start

Failed.... please tell how to do

kenberkeley commented 7 years ago
npm i cnpm -g
cnpm i cross-env -g
npm start
kenberkeley commented 7 years ago

2

MillerFour commented 7 years ago

it still fail,following is the log. 0 info it worked if it ends with ok 1 verbose cli [ 'E:\nodejs\node.exe', 1 verbose cli 'E:\nodejs\node_modules\npm\bin\npm-cli.js', 1 verbose cli 'start' ] 2 info using npm@3.7.3 3 info using node@v5.9.0 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle vue-demo@0.1.0~prestart: vue-demo@0.1.0 6 silly lifecycle vue-demo@0.1.0~prestart: no script for prestart, continuing 7 info lifecycle vue-demo@0.1.0~start: vue-demo@0.1.0 8 verbose lifecycle vue-demo@0.1.0~start: unsafe-perm in lifecycle true 9 verbose lifecycle vue-demo@0.1.0~start: PATH: E:\nodejs\node_modules\npm\bin\node-gyp-bin;E:\workspace\vue-demo-master\node_modules.bin;E:\nodejs;C:\ProgramData\Oracle\Java\javapath--;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;E:\nodejs\;C:\Program Files\Java\jdk1.8.0_92\bin;C:\Program Files\Java\jdk1.8.0_92\jre\bin;C:\Users\Administrator\AppData\Roaming\npm;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps; 10 verbose lifecycle vue-demo@0.1.0~start: CWD: E:\workspace\vue-demo-master 11 silly lifecycle vue-demo@0.1.0~start: Args: [ '/d /s /c', 11 silly lifecycle 'cross-env NODE_ENV=development node build/dev.js' ] 12 silly lifecycle vue-demo@0.1.0~start: Returned: code: 1 signal: null 13 info lifecycle vue-demo@0.1.0~start: Failed to exec start script 14 verbose stack Error: vue-demo@0.1.0 start: cross-env NODE_ENV=development node build/dev.js 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (E:\nodejs\node_modules\npm\lib\utils\lifecycle.js:239:16) 14 verbose stack at emitTwo (events.js:100:13) 14 verbose stack at EventEmitter.emit (events.js:185:7) 14 verbose stack at ChildProcess. (E:\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) 14 verbose stack at emitTwo (events.js:100:13) 14 verbose stack at ChildProcess.emit (events.js:185:7) 14 verbose stack at maybeClose (internal/child_process.js:850:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 15 verbose pkgid vue-demo@0.1.0 16 verbose cwd E:\workspace\vue-demo-master 17 error Windows_NT 10.0.14393 18 error argv "E:\nodejs\node.exe" "E:\nodejs\node_modules\npm\bin\npm-cli.js" "start" 19 error node v5.9.0 20 error npm v3.7.3 21 error code ELIFECYCLE 22 error vue-demo@0.1.0 start: cross-env NODE_ENV=development node build/dev.js 22 error Exit status 1 23 error Failed at the vue-demo@0.1.0 start script 'cross-env NODE_ENV=development node build/dev.js'. 23 error Make sure you have the latest version of node.js and npm installed. 23 error If you do, this is most likely a problem with the vue-demo package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error cross-env NODE_ENV=development node build/dev.js 23 error You can get information on how to open an issue for this project with: 23 error npm bugs vue-demo 23 error Or if that isn't available, you can get their info via: 23 error npm owner ls vue-demo 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

kenberkeley commented 7 years ago

从报错信息,难以找出有用的线索 建议重新拉取安装:

rm -rf vue-demo

git clone https://github.com/kenberkeley/vue-demo.git
cd vue-demo

cnpm i
npm start
MillerFour commented 7 years ago

好的吧,初学前端,请多指教,谢谢解答

MillerFour commented 7 years ago

npm start之后 自动弹出浏览器 localhost:8080 地址 但是显示的却是

Cannot GET / 这个,求解?

kenberkeley commented 7 years ago

任何异常,控制台必有报错,建议自查。