npm ci 不适用于 bitbucket 管道?

npm ci not working on bitbucket pipeline?

我有一个 react-native 项目,我正在尝试使用 bitbucket 管道 运行 测试并导出到 expo。

为此,我尝试遵循 this article,但失败并显示以下输出:

+ 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

事实是,npm ci 在我的本地机器上正常工作。

我缺乏想法。有帮助吗?

我设法使用 'node' 图像而不是 'node:alpine' 解决了这个问题。

也许 node:alpine 默认没有安装 ssh?

任何进一步的解释将不胜感激:)

我遇到了类似的错误,唯一的区别是我在 node:10-alpine 图像上使用 https URL 而不是 SSH URL。

为了解决这个问题,我在 运行 npm install.

之前使用 apk add git 安装了 git