簡體   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