{ Error: spawn vue-cli-service ENOENT
    at notFoundError (C:\Users\wyhui\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (C:\Users\wyhui\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit (C:\Users\wyhui\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\cross-spawn\lib\enoent.js:27:25)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn vue-cli-service',
  path: 'vue-cli-service',
  spawnargs: [ 'serve', '--mode', 'development', '--dashboard' ] }

运行vue项目的时候报上面这个错,解决方法:删掉node_modules,重新cnpm install一下就好了。

Logo

前往低代码交流专区

更多推荐