git - AWS CodeBuild 中的 lerna 构建错误并出现错误:“命令失败:git rev-list”
问题描述
我是 AWS CodeBuild 的新手。
我正在设置将我的 javascript 包发布到 npm。我的回购是与 Lerna 组成的单一回购。所以,我运行脚本 lerna publish 来发布我的新版本。这在我的本地环境中运行良好。
但是如果我尝试使用由 github webhook 执行的 AWS CodeBuild,下面的消息会失败
[Container] 2020/10/15 08:54:01 Running command lerna publish
info cli using local version of lerna
lerna notice cli v3.22.1
lerna info versioning independent
lerna info ci enabled
lerna ERR! Error: Command failed: git rev-list --count ~~~~~~
lerna ERR! error: Could not read ~~~~~~~
lerna ERR! fatal: Failed to traverse parents of commit ~~~~~~
lerna ERR!
lerna ERR!
lerna ERR! at makeError (/codebuild/output~~~/node_modules/execa/index.js:174:9)
lerna ERR! at Function.module.exports.sync
我不知道是什么问题。
这是我的 buildSpect.yml。谢谢。
version: 0.2
env:
variables:
REGION: "us-east-1"
IMAGE_NAME: conekta-registry
REGISTRY: dkr.ecr.us-east-1.amazonaws.com
OUTPUT: json
phases:
install:
runtime-versions:
python: 3.8
nodejs: 12
pre_build:
commands:
- echo $NPM_TOKEN
- npm install -g lerna
- yarn install
build:
commands:
- lerna run build
post_build:
commands:
- lerna publish
解决方案
推荐阅读
- oracle-sqldeveloper - 为什么 SQL*Developer 代码编辑器运行缓慢?
- c++ - 如何编写具有任意数量参数包的函数
- azure - 不推荐使用 AAD APP 进行身份验证...我的观点是否正确
- python - 如果条件满足,则选择最少两列的更快方法,否则只有一列
- html - 如何删除 text 和 div 里面的空格?
- image - 如何将具有不同分辨率的不同类型的 3D 图像重新采样为一种分辨率
- typescript - 如何将类型导入 vue2 typescript 项目
- python-3.x - Python for循环,多行打印
- apache-zookeeper - 为什么kafka log越来越大
- amazon-eks - 外部机密 AccessDenied 错误中的 aws eks