Why can't I install these expo navigation dependencies?

I’m trying to run the commands listed here:


I installed “navigation” itself correctly

But when I try the following command:

expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context @react-native-community/masked-view

I get the following error:

Installing 5 SDK 36.0.0 compatible native modules using npm
> npm install
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno -4058
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

I’ve installed them before with no problem with other projects, so I don’t know why this could be happening

Expo diagnostics:

  Expo CLI 3.11.9 environment info:
      OS: Windows 10
      npm: 6.13.6 - C:\Program Files\nodejs\npm.CMD
      Android Studio: Version AI-191.8026.42.35.6010548

hi there!

this appears to be caused by this dependency in react-native-gesture-handler: https://github.com/software-mansion/react-native-gesture-handler/blob/d9c7553c8d7112dcff9bd498975a5f4b0a1fa9bc/package.json#L70

for some reason git in your environment is not working properly when invoked by npm. is it possible that you do not have git installed and in your PATH?

Do I need git installed? I don’t think it was ever installed to begin with and I installed these dependancies on other projects

yeah - we list git as a pre-requisite in our installation guide https://docs.expo.io/versions/v36.0.0/get-started/installation/#1-local-development-tool-expo-cli


I managed to fix this by downgrading node.js from version 12.x to 10.x

I installed git, added it to my PATH, and downgraded to Node.js 10.19.0

but I’m still getting the errors

If you type which git, what do you get?

Is the error message still the same? If not, please post the current error message.

I am also getting the same issue. Did the issue get solved for you?


This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.