React native Npm启动:启动服务器时出错

React native Npm启动:启动服务器时出错,react-native,npm,expo,npm-start,expo-cli,React Native,Npm,Expo,Npm Start,Expo Cli,我正在尝试运行NPMServer,但我得到了那个错误 Expo DevTools is running at http://localhost:19002 Opening DevTools in the browser... (press shift-d to disable) Error: spawn powershell ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)

我正在尝试运行NPMServer,但我得到了那个错误

Expo DevTools is running at http://localhost:19002
Opening DevTools in the browser... (press shift-d to disable)
Error: spawn powershell 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\Danger World\AppData\Roaming\npm-cache\_logs\2020-09-02T10_54_16_635Z-debug.log
任何人都可以帮助我解决方案1---

  • 首先将powershell作为%SystemRoot%/system32/WindowsPowerShell/v1.0添加到路径
  • 以管理员身份打开powershell并编写此命令集ExecutionPolicy Unrestricted-Scope CurrentUser-Force
  • 最后一件事是启动npm windows升级
  • 解决方案2---

  • 将%SystemRoot%/system32/WindowsPowerShell/v1.0添加到PATH变量中
  • cmd+q和search env并按enter键
  • 单击“高级”选项卡中的“环境变量”
  • 找到路径/路径变量,然后单击编辑
  • 单击新建并粘贴%SystemRoot%/system32/WindowsPowerShell/v1.0
  • 单击确定并重新启动终端,然后再次尝试安装