简体   繁体   English

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

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

I'm running npm ci on Node 16 in GitHub workflow actions and keep getting the following error:我在 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.

I tried deleting the package-lock.json file and running npm i locally and uploading the new file.我尝试删除 package-lock.json 文件并在本地运行npm i并上传新文件。 But it did not make a difference.但这并没有什么不同。

Please advise how I can resolve this.请告知我如何解决这个问题。

Looks like some of the packages in your package-lock.json file are in private registries.看起来您的package-lock.json文件中的一些包位于私有注册表中。

You need to login to that registry as it is saying in the error.您需要按照错误中的说明登录该注册表。 Otherwise NPM cannot pull those packages.否则 NPM 无法拉取这些包。

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

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