繁体   English   中英

npm ci 命令在节点 16 上运行时在 GitHub 操作中失败

[英]npm ci command fails in GitHub actions when running on Node 16

我在 GitHub 工作流操作的节点 16 上运行npm ci并不断收到以下错误:

npm ERR! code E401
npm ERR! Incorrect or missing password.
npm ERR! If you were trying to login, change your password, create an
npm ERR! authentication token or enable two-factor authentication then
npm ERR! that means you likely typed your password in incorrectly.
npm ERR! Please try again, or recover your password at:
npm ERR!     https://www.npmjs.com/forgot
npm ERR! 
npm ERR! If you were doing some other operation then your saved credentials are
npm ERR! probably out of date. To correct this please try logging in again with:
npm ERR!     npm login

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2022-01-10T11_38_28_617Z-debug.log
Error: Process completed with exit code 1.

我尝试删除 package-lock.json 文件并在本地运行npm i并上传新文件。 但这并没有什么不同。

请告知我如何解决这个问题。

看起来您的package-lock.json文件中的一些包位于私有注册表中。

您需要按照错误中的说明登录该注册表。 否则 NPM 无法拉取这些包。

暂无
暂无

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

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