简体   繁体   中英

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:

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. 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.

You need to login to that registry as it is saying in the error. Otherwise NPM cannot pull those packages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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