51Testing软件测试论坛

标题: 运行 vue-element-admin 时报错的问题 [打印本页]

作者: 测试积点老人    时间: 2021-1-22 09:13
标题: 运行 vue-element-admin 时报错的问题
下载了vue-element-admin,在本地npm insatall后npm run dev后报错。删除node_modules后重置也不行
  1. C:\Users\Le'novo\Desktop\project\vue-element-admin>npm run dev

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

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

  6. DONE Compiled successfully in 23484ms 15:55:03

  7. App running at:

  8. Local: http://localhost:9527/

  9. Network: unavailable

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

  12. events.js:288
  13. throw er; // Unhandled 'error' event
  14. ^

  15. Error: spawn cmd ENOENT
  16. at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
  17. at onErrorNT (internal/child_process.js:469:16)
  18. at processTicksAndRejections (internal/process/task_queues.js:84:21)
  19. Emitted 'error' event on ChildProcess instance at:
  20. at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
  21. at onErrorNT (internal/child_process.js:469:16)
  22. at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  23. errno: 'ENOENT',
  24. code: 'ENOENT',
  25. syscall: 'spawn cmd',
  26. path: 'cmd',
  27. spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:9527/' ]
  28. }
  29. npm ERR! code ELIFECYCLE
  30. npm ERR! errno 1
  31. npm ERR! vue-element-admin@4.4.0 dev:vue-cli-service serve
  32. npm ERR! Exit status 1
  33. npm ERR!
  34. npm ERR! Failed at the vue-element-admin@4.4.0 dev script.
  35. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

  36. npm ERR! A complete log of this run can be found in:
  37. npm ERR! D:\nodejs\node_cache_logs\2020-07-02T07_55_03_271Z-debug.log



  38. 报错日志

  39. 0 info it worked if it ends with ok
  40. 1 verbose cli [
  41. 1 verbose cli 'C:\Program Files\nodejs\node.exe',
  42. 1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
  43. 1 verbose cli 'run',
  44. 1 verbose cli 'dev'
  45. 1 verbose cli ]
  46. 2 info using npm@6.13.4
  47. 3 info using node@v12.16.1
  48. 4 verbose run-script [ 'predev', 'dev', 'postdev' ]
  49. 5 info lifecycle vue-element-admin@4.4.0~predev: vue-element-admin@4.4.0
  50. 6 info lifecycle vue-element-admin@4.4.0~dev: vue-element-admin@4.4.0
  51. 7 verbose lifecycle vue-element-admin@4.4.0~dev: unsafe-perm in lifecycle true
  52. 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;
  53. 9 verbose lifecycle vue-element-admin@4.4.0~dev: CWD: C:\Users\Le'novo\Desktop\project\vue-element-admin
  54. 10 silly lifecycle vue-element-admin@4.4.0~dev: Args: [ '/d /s /c', 'vue-cli-service serve' ]
  55. 11 silly lifecycle vue-element-admin@4.4.0~dev: Returned: code: 1 signal: null
  56. 12 info lifecycle vue-element-admin@4.4.0~dev: Failed to exec dev script
  57. 13 verbose stack Error: vue-element-admin@4.4.0 dev:vue-cli-service serve
  58. 13 verbose stack Exit status 1
  59. 13 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
  60. 13 verbose stack at EventEmitter.emit (events.js:311:20)
  61. 13 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
  62. 13 verbose stack at ChildProcess.emit (events.js:311:20)
  63. 13 verbose stack at maybeClose (internal/child_process.js:1021:16)
  64. 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
  65. 14 verbose pkgid vue-element-admin@4.4.0
  66. 15 verbose cwd C:\Users\Le'novo\Desktop\project\vue-element-admin
  67. 16 verbose Windows_NT 10.0.17763
  68. 17 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
  69. 18 verbose node v12.16.1
  70. 19 verbose npm v6.13.4
  71. 20 error code ELIFECYCLE
  72. 21 error errno 1
  73. 22 error vue-element-admin@4.4.0 dev:vue-cli-service serve
  74. 22 error Exit status 1
  75. 23 error Failed at the vue-element-admin@4.4.0 dev script.
  76. 23 error This is probably not a problem with npm. There is likely additional logging output above.
  77. 24 verbose exit [ 1, true ]
复制代码



作者: 郭小贱    时间: 2021-1-25 09:27
把npm ERR! D:\nodejs\node_cache_logs\2020-07-02T07_55_03_271Z-debug.log   这个log信息发上来看看。
作者: bellas    时间: 2021-1-25 09:33
参考下这个链接https://blog.csdn.net/weixin_37935725/article/details/105767933
作者: qqq911    时间: 2021-1-25 10:35
完整重装下
作者: jingzizx    时间: 2021-1-25 15:08
感觉这么多呢
作者: litingting0214    时间: 2021-1-25 17:10
https://blog.csdn.net/weixin_37935725/article/details/105767933  参考下这篇文章




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2