2

I have a react-native project and I'm trying to use bitbucket pipeline to run the tests and export to expo.

For that I tried to follow this article, but it fail with the following output :

+ npm ci
npm ERR! path git
npm ERR! code ENOENT
npm ERR! errno ENOENT
npm ERR! syscall spawn git
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/expo/react-native-maps.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 
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-03-06T00_28_01_570Z-debug.log

The thing is, npm ci works properly on my local machine.

I'm short of ideas. Any help ?

baraber
  • 3,296
  • 27
  • 46

2 Answers2

2

I managed to work around the problem using 'node' image instead of 'node:alpine'.

Maybe ssh not installed by default on node:alpine ?

Any further explanation would be appreciated :)

baraber
  • 3,296
  • 27
  • 46
2

I experienced a similar error, the only difference being that I was using the https URL instead of the SSH URL, on a node:10-alpine image.

To fix the issue, I installed git using apk add git before running npm install.

CopyLeft
  • 321
  • 4
  • 6
  • Thanks, it really helped me. I didn't read this part `npm ERR! syscall spawn git` (which means that you don't have git installed) – giwiro May 28 '21 at 19:25