1

I am building an app with Expo and I want to detect if a user has internet connection, but I have trouble installing NetInfo. I tried running: expo install @react-native-community/netinfo

but I get an error:

[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.

Meanwhile when I tried installing masked-view, I got:

[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.

Can anyone help me to find the root of this problem?

Karolina
  • 85
  • 7

2 Answers2

1

Try re-installing React Native MaskedView

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

or

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

Feel free for doubts.

SDushan
  • 4,341
  • 2
  • 16
  • 34
1

I had same issue, simply tried with below command, it works.

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

Alternatively:

npm install --save @react-native-community/masked-view
Elletlar
  • 3,136
  • 7
  • 32
  • 38