繁体   English   中英

npm ci 不在 bitbucket 管道上工作?

[英]npm ci not working on bitbucket pipeline?

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

为此,我尝试按照本文进行操作,但失败并显示以下输出:

+ 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:alpine 上安装 ssh ?

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

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

为了解决这个问题,我在运行npm install之前使用apk add git安装了 git。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM