【问题标题】:React Native Expo error: "'node' is not recognized as an internal or external command, operable program or batch file" while setting up the projectReact Native Expo错误:设置项目时“'node'不被识别为内部或外部命令,可运行程序或批处理文件”
【发布时间】:2022-01-07 05:31:52
【问题描述】:

在使用 React native 和 expo 为身份验证应用设置环境时

这些是我运行的代码:

expo init firebaseauth
npm install @react-navigation/native
expo install react-native-screens react-native-safe-area-context
npm install @react-navigation/native-stack

但是在 VS 代码终端中运行 expo install firebase 时,它正在返回:

'node' is not recognized as an internal or external command,
operable program or batch file.

之后采取的行动:

  1. 安装了最新版本的 Node 和 NPM。
  2. 设置环境变量为C:\Program Files\nodejs
  3. 重新启动我的系统

在运行 expo install firebase 时仍然在 VS 代码终端中返回相同的错误

'node' is not recognized as an internal or external command,
operable program or batch file.

【问题讨论】:

    标签: node.js firebase react-native expo


    【解决方案1】:

    重启系统后,Node被我的vs代码终端识别了。

    在那之后,Yarn 抛出了同样的错误。

    我必须以管理员身份从 Windows PowerShell 更新 Node、npm、yarn 和 expo。否则,如果您不以管理员身份更新所有这些,则它们都不起作用。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-22
      • 2018-01-02
      • 2021-11-07
      • 2015-04-28
      • 2016-06-19
      • 1970-01-01
      相关资源
      最近更新 更多