【问题标题】:How to fix react native expo starting code?如何修复反应原生博览会起始代码?
【发布时间】:2019-03-27 17:11:56
【问题描述】:

当我输入正常的 expo 代码并启动我的项目时,我收到以下错误:

npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/expo/react-native-maps.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Atharva Sawant\AppData\Roaming\npm-cache\_logs\2019-03-27T17_07_14_954Z-debug.log
Process exited with non-zero code: 1
Set EXPO_DEBUG=true in your env to view the stack trace.

【问题讨论】:

  • 尝试删除节点模块并重新安装。 npm 安装
  • 同样的事情发生了!

标签: react-native mobile expo


【解决方案1】:

我搜索了错误并找到了解决方案。

我参考the link.草拟了答案

如前所述https://git-for-windows.github.io/,我首先安装了适用于 Windows 的 Git,从而使其能够正常工作。

然后,不要打开常规命令提示符并发出 apm install 命令,而是转到 Windows 开始菜单并打开 Git CMD。在那里运行命令,它应该可以工作。

你尝试将 GIT 添加到 $PATH

如果不能使用 Set,请尝试使用 Setx 添加。

语法示例是:

setx PATH "%PATH%;C:\Program Files\MySQL\MySQL Server 5.5\bin" /M

如果您还有其他问题,请发表评论。

【讨论】:

  • 不过,它会在一段时间后冻结
  • 你可以试试Cd Project_Dir>Set EXPO_DEBUG=ture吗?
猜你喜欢
  • 1970-01-01
  • 2023-03-11
  • 2019-01-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-23
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多