小编fri*_*tz6的帖子

npm 错误!无法进行身份验证,需要:Basic Realm="https://pkgsprodsu3weu.app.pkgs.visualstudio.com/"

我运行 npm i @wtw/canvas 并收到此错误:

npm ERR! code E401
npm ERR! Unable to authenticate, need: Basic realm="https://pkgsprodsu3weu.app.pkgs.visualstudio.com/"
Run Code Online (Sandbox Code Playgroud)

我的.npmrc:

@willistowerswatson:registry=https://rcss-willistowerswatson.pkgs.visualstudio.com/_packaging/Core@Local/npm/registry/
registry=https://registry.npmjs.org/
//always-auth=true
//pkgs.dev.azure.com/rcss-willistowerswatson/RadarEnterprise/_packaging/RadarEnterprise/npm/registry/:username=VssSessionToken
Run Code Online (Sandbox Code Playgroud)

我已经尝试过:

vsts-npm-auth -config C:\Users\wilso224\.npmrc

vsts-npm-auth v0.41.0.0
-----------------------
Already have credentials for https://rcss-willistowerswatson.pkgs.visualstudio.com/_packaging/Core@Local/npm/registry/
Run Code Online (Sandbox Code Playgroud)

这也失败了:

npm i --registry https://registry.npmjs.org @wtw/canvas
Run Code Online (Sandbox Code Playgroud)

结果:

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@wtw%2fcanvas - Not found
npm ERR! 404
npm ERR! 404  '@wtw/canvas@0.1.1' is not in the npm registry.
Run Code Online (Sandbox Code Playgroud)

我已经阅读了以下内容:

npm 错误!无法验证,需要:Basic Realm=“Artifactory Realm”

npm 令牌列表给出错误

https://learn.microsoft.com/en-gb/azure/devops/artifacts/npm/npmrc?view=azure-devops&tabs=windows%2Cclassic#set-up-authentication-on-your-dev-box

https://developercommunity.visualstudio.com/t/401-when-attempting-to-run-npm-install/928369

谢谢。

编辑#1 …

realm node.js npm

4
推荐指数
1
解决办法
3728
查看次数

标签 统计

node.js ×1

npm ×1

realm ×1