在启动已经vue 项目时报错:
{ 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' ] }
看了网上的多种解决方法,有的说需要先把node_modules删掉再npm install,但是我直接什么操作都没有做,只是npm install了一下重新run的时候就好了。