【发布时间】:2019-10-01 01:54:20
【问题描述】:
我正在尝试运行npm install react-native-gesture-handler,但我的终端给了我这个错误:
SAMETs-MBP:HelloWorld developer$ npm install react-native-gesture-handler
npm ERR! path /Users/developer/HelloWorld/node_modules/react-native-safe-area-view
npm ERR! code EISGIT
npm ERR! git /Users/developer/HelloWorld/node_modules/react-native-safe-area-view: Appears to be a git repo or submodule.
npm ERR! git /Users/developer/HelloWorld/node_modules/react-native-safe-area-view
npm ERR! git Refusing to remove it. Update manually,
npm ERR! git or move it out of the way first.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/developer/.npm/_logs/2019-05-14T05_27_08_555Z-debug.log
谁能帮我解决这个问题?我在网上搜索,但没有找到任何东西。
【问题讨论】:
-
删除你的 node_module 文件夹然后使用 npm i
-
我做到了。我在尝试运行
npm i时收到同样的错误 -
@SametMutevelli 删除你的 node_module 和 package-lock.json,清除你的 npm 缓存,然后运行 npm install,还有你使用的 react-native 版本是什么
-
@SametMutevelli 我得到了同样的错误!你解决了这个问题吗?如果是,请分享您的答案
标签: react-native npm react-navigation npm-install