当我开始使用命令NPM start运行脚手架react native程序时出现错误。错误是
C:\Users\ron\Desktop\pro\DoneWithIt>npm start
> @ start C:\Users\ron\Desktop\pro\DoneWithIt
> expo start
Starting project at C:\Users\ron\Desktop\pro\DoneWithIt
Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ron\AppData\Roaming\npm-cache\_logs\2020-07-27T14_46_27_490Z-debug.log
答案 0 :(得分:0)
在环境变量中的路径变量中未设置“%SystemRoot%\ system32”时,会发生这种情况。