【发布时间】:2020-05-28 02:15:12
【问题描述】:
我正在使用 Expo 构建一个应用程序,我想检测用户是否有互联网连接,但我在安装 NetInfo 时遇到了问题。我尝试运行:
expo install @react-native-community/netinfo
但我得到一个错误:
[14:32:00] > npm install
npm ERR! Error while executing:
npm ERR! C:\Users\myusername\AppData\Local\Programs\Git\mingw64\bin\git.EXE ls-remote -h -t ssh://git@github.com/react-native-community/masked-view.git
npm ERR!
npm ERR! undefined
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myusername\AppData\Roaming\npm-cache\_logs\2020-02-12T13_34_44_927Z-debug.log
[14:34:44] npm exited with non-zero code: 1
[14:34:44] Set EXPO_DEBUG=true in your env to view the stack trace.
同时,当我尝试安装 masked-view 时,我得到了:
[13:18:20] > npm install
npm ERR! Error while executing:
npm ERR! C:\Users\myusername\AppData\Local\Programs\Git\mingw64\bin\git.EXE ls-remote -h -t ssh://git@github.com/react-native-community/masked-view.git
npm ERR!
npm ERR! undefined
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\myusername\AppData\Roaming\npm-cache\_logs\2020-02-12T12_21_03_015Z-debug.log
[13:21:03] npm exited with non-zero code: 1
[13:21:03] Set EXPO_DEBUG=true in your env to view the stack trace.
谁能帮我找出这个问题的根源?
【问题讨论】:
标签: react-native npm expo npm-install