node项目报错spawn cmd ENOENT
今天在运行node项目的时候,报了这个错,说是cmd命令没有关联之类的,我百度找了好多文章,都说是需要关联环境变量才可以,因为我的电脑之前装环境的时候,失误将环境变量删除了,后面因为项目需要,一些又重新添加了一些,node启动项目这之间也没有影响,但是今天装一个后台管理系统的时候就报了下面这个错,我通过重新安装node服务,解决了这个问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| events.js:187
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:270:12)
at onErrorNT (internal/child_process.js:456:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:8080/' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
「梦想一旦被付诸行动,就会变得神圣,如果觉得我的文章对您有用,请帮助本站成长」
共 0 条评论关于"node项目报错spawn cmd ENOENT"
最新评论