微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Yarn 发布在 CircleCI 上失败并出现错误,但在本地工作

如何解决Yarn 发布在 CircleCI 上失败并出现错误,但在本地工作

我正在开发另一个 NIH 库,并希望将 git 标签从公共 CircleCI 自动推送到 npm(即没有网络限制、代理等,我的本地设置在网络方面应该是等效的)。但是,我可以在本地执行,但不能在 CircleCI 上执行,即使 yarn 配置和版本差异不大。

本地:

yarn config v1.22.10
info yarn config
{
  'version-tag-prefix': 'v','version-git-tag': true,'version-commit-hooks': true,'version-git-sign': false,'version-git-message': 'v%s','init-version': '1.0.0','init-license': 'MIT','save-prefix': '^','bin-links': true,'ignore-scripts': false,'ignore-optional': false,registry: 'https://registry.yarnpkg.com','strict-ssl': true,'user-agent': 'yarn/1.22.10 npm/? node/v15.14.0 linux x64',lastUpdateCheck: 1618983093568
}
info npm config
{}
Done

CircleCI:

yarn config v1.22.5
info yarn config
{
  'version-tag-prefix': 'v','user-agent': 'yarn/1.22.5 npm/? node/v15.14.0 linux x64',version: '1.22.5'
}
info npm config
{
  version: '1.22.5'
}

本地发布:

NPM_TOKEN=<redacted> yarn publish --access public 
<successfully publishes>

CircleCI 发布:

NPM_TOKEN=<the very same token> yarn publish --access public 
error Couldn't publish package: "https://registry.npmjs.org/@scope%2fpackage: Not found"
info Visit https://yarnpkg.com/en/docs/cli/publish for documentation about this command.

工作流的 CiecleCI 配置版本为 2.1 / 2.0

我在谷歌上找不到太多东西(可能是我没有构建正确的查询)。这里可能有什么问题?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。