vue ui

做完上一篇的工作,即vue -V可以正常运行之后,我们使用vue ui指令,会发现报以下错误:

Error: spawn cmd ENOENT
Emitted ‘error’ event on ChildProcess instance at:
errno: ‘ENOENT’,
code: ‘ENOENT’,
syscall: ‘spawn cmd’,
path: ‘cmd’,
spawnargs: [ ‘/c’, ‘start’, ‘""’, ‘/b’, ‘http://localhost:8000’ ]

解决办法:
系统变量Path中,编辑,新建,vue ui
加入如图两个变量:
C:\Windows\System32
%SystemRoot%\system32;
注意第二个要带着分号!
完美解决!