“Error: spawn cmd ENOENT” In Expo Init Project

◇◆丶佛笑我妖孽 提交于 2019-12-06 09:03:54

问题


I am starting a new React-Native Project using

expo init firstexpo

But I get this error at Command Prompt

Error: spawn cmd ENOENT

PS C:\Users\Alex\testing\firstexpo> expo start
[16:21:09] Starting project at C:\Users\Alex\testing\firstexpo
[16:21:11] Expo DevTools is running at http://localhost:19002
[16:21:11] Opening DevTools in the browser... (press shift-d to disable)
Error: spawn cmd ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
PS C:\Users\Alex\testing\firstexpo>

npm start error Cannot find module 'opn'

[16:38:49] Starting project at C:\Users\Alex\testing\firstexpo
[16:38:52] Expo DevTools is running at http://localhost:19002
[16:38:52] Opening DevTools in the browser... (press shift-d to disable)
[16:38:52] Cannot find module 'opn'
[16:38:52] Set EXPO_DEBUG=true in your env to view the stack trace.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! empty-project-template@ start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the empty-project-template@ 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\Alex\AppData\Roaming\npm-cache\_logs\2018-11-24T08_38_52_344Z-debug.log

I am very new to coding, can anyone tell me how can I solve the problem? Thank you very much.

Downgrade to v28


回答1:


I solved my error using this. "%SystemRoot%\system32;" in the PATH variable.



来源:https://stackoverflow.com/questions/53456639/error-spawn-cmd-enoent-in-expo-init-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!