npm ci没有在bitbucket管道上工作?

问题描述 投票:2回答:1

我有一个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://[email protected]/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在我的本地机器上正常工作。

我缺乏想法。有帮助吗?

bitbucket-pipelines npm-ci
1个回答
2
投票

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

也许在节点上默认没有安装ssh:alpine?

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


0
投票

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

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

© www.soinside.com 2019 - 2024. All rights reserved.