【问题标题】:React Native Expo: Error installing masked-viewReact Native Expo:安装蒙面视图时出错
【发布时间】: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


【解决方案1】:

我也有同样的问题,用下面的命令试了一下,就可以了。

npm install @react-native-community/masked-view

或者:

npm install --save @react-native-community/masked-view

【讨论】:

    【解决方案2】:

    尝试重新安装React Native MaskedView

    yarn add @react-native-community/masked-view
    

    npm install --save @react-native-community/masked-view
    

    请不要怀疑。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-12
      • 1970-01-01
      • 2019-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-10
      • 1970-01-01
      相关资源
      最近更新 更多