2020-07-02 16:02
采纳率: 100%
浏览 7.1k

运行 vue-element-admin 时报错的问题

下载了vue-element-admin,在本地npm insatall后npm run dev后报错。删除node_modules后重置也不行

C:\Users\Le'novo\Desktop\project\vue-element-admin>npm run dev

vue-element-admin@4.4.0 dev C:\Users\Le'novo\Desktop\project\vue-element-admin
vue-cli-service serve

INFO Starting development server...
98% after emitting CopyPlugin

DONE Compiled successfully in 23484ms 15:55:03

App running at:

  • Local: http://localhost:9527/
  • Network: unavailable

    Note that the development build is not optimized.
    To create a production build, run npm run build.

throw er; // Unhandled 'error' event

Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:9527/' ]
npm ERR! errno 1
npm ERR! vue-element-admin@4.4.0 dev: vue-cli-service serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-element-admin@4.4.0 dev 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! D:\nodejs\node_cache_logs\2020-07-02T07_55_03_271Z-debug.log


0 info it worked if it ends with ok
1 verbose cli [
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 'dev'
1 verbose cli ]
2 info using npm@6.13.4
3 info using node@v12.16.1
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle vue-element-admin@4.4.0~predev: vue-element-admin@4.4.0
6 info lifecycle vue-element-admin@4.4.0~dev: vue-element-admin@4.4.0
7 verbose lifecycle vue-element-admin@4.4.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle vue-element-admin@4.4.0~dev: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Le'novo\Desktop\project\vue-element-admin\node_modules.bin;C:\redis;C:\Program Files\nodejs\;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files\nodejs\node_global;C:\Program Files\nodejs\node_global\node_modules\yarn\bin;C:\Program Files\nodejs\node_global;C:\Program Files\nodejs\node_global\node_modules\cnpm\bin;C:\Users\Le'novo\AppData\Local\Microsoft\WindowsApps;"C:\Users\Le'novo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Program Files\nodejs\node_global\node_modules";C:\redis;C:\Users\Le'novo\AppData\Roaming\npm;C:\Program Files\nodejs\node_global\;C:\Program Files\nodejs\node_modules;C:\Program Files\nodejs\node_global\node_modules\yarn\bin;
9 verbose lifecycle vue-element-admin@4.4.0~dev: CWD: C:\Users\Le'novo\Desktop\project\vue-element-admin
10 silly lifecycle vue-element-admin@4.4.0~dev: Args: [ '/d /s /c', 'vue-cli-service serve' ]
11 silly lifecycle vue-element-admin@4.4.0~dev: Returned: code: 1 signal: null
12 info lifecycle vue-element-admin@4.4.0~dev: Failed to exec dev script
13 verbose stack Error: vue-element-admin@4.4.0 dev: vue-cli-service serve
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:311:20)
13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:311:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid vue-element-admin@4.4.0
15 verbose cwd C:\Users\Le'novo\Desktop\project\vue-element-admin
16 verbose Windows_NT 10.0.17763
17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
18 verbose node v12.16.1
19 verbose npm v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error vue-element-admin@4.4.0 dev: vue-cli-service serve
22 error Exit status 1
23 error Failed at the vue-element-admin@4.4.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题