react-native - 开发服务器返回错误码 500
问题描述
我想运行反应导航。它给了我手势处理程序的这个错误。当我要安装手势处理程序时,会发生以下错误。请给我适当的解决方案。
C:\Users\Farooq\FirstActivity>npm install --save react-native-gesture-handler
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t https://github.com/naver/hammer.js.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\Farooq\AppData\Roaming\npm-cache\_logs\2020-02-11T21_17_29_196Z-debug.log
解决方案
这是 windows 环境的典型问题。
然后按照以下步骤
打开你的环境变量
编辑路径
找到您设备中安装的 git 位置。例子是
C:\Program Files\Git\cmd
将 git 位置添加到Path(确保将其添加到用户变量和系统变量)
应用更改并重新启动您的电脑
最后,回到你的项目并运行
npm install react-native-gesture-handler
推荐阅读
- css - 使用 3d css 变换旋转对象时,如何保持方向不变,即“越过顶部”而不是向后
- hazelcast - Payara4/Hazelcast x 第一次失败的容错
- scala - 将文件从 Hdfs 复制到 Hdfs scala
- python - 使用堆栈或熔化在交叉表中重塑数据
- jquery - 如何获取特定(此)行的列值?
- php - 通过 php 调用时,expect_out(buffer) 未捕获所有数据
- cocoapods - 无效的`Podfile`文件:语法错误,意外的输入结束,期望keyword_end
- keras - 使用目录中的 Keras 流进行 K 折交叉验证
- python - 如何找到已从客户端使用的域以在 python 套接字中到达我的服务器?
- javascript - 在字符串中查找查询匹配项