我尝试运行命令:
\nnpm install -g @angular/cli@9.1.0\nRun Code Online (Sandbox Code Playgroud)\n但我有以下错误:
\n\n\nnpm 错误!代码E401
\n
\nnpm 错误!无法验证,需要:Basic Realm=“Artifactory Realm”npm 错误!此运行的完整日志可以在以下位置找到:
\n
\nnpm ERR!/Users/xxxx/.npm/_logs/2021-08-10T19_33_12_063Z-debug.log
注意:node js 和 npm 工作正常。
\n我已按照 Artifactory 中的说明使用以下命令解决此问题:
\nnpm config set registry https://artifactory.......com/artifactory/api/npm/xxxx/\nRun Code Online (Sandbox Code Playgroud)\n因为我已将以下内容粘贴到 ~/.npmrc 文件中:
\n_auth = fhgf......ghgj==\nemail = xxx@xxx.com\nalways-auth = true\nRun Code Online (Sandbox Code Playgroud)\n我也尝试过使用npm login,但出现以下错误并且无法\xe2\x80\x99t 继续:
\n\nnpm 登录
\n
\n用户名:xxx@xxx.com
\nnpm 警告名称不能包含非 url 安全字符
\n用户名:(xxx@xxx.com)
\n用户名:(xxx@xxx.com)
\n用户名:(xxx@xxx .com)
\n用户名: (xxx@xxx.com)
我该如何解决这个问题?
\n我刚刚使用以下命令升级了npm:
npm install npm@latest -g
当我做npm token list现在,我收到以下错误:
npm ERR!代码EAUTHIP
npm ERR!无法验证,需要:基本,承载
npm ERR!可以在以下位置找到此运行的完整日志:
npm ERR!/Users/USerName/.npm/_logs/2018-03-28T16_31_29_299Z-debug.log
以下是上述日志文件的内容:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/6.8.1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'token',
1 verbose cli 'list' ]
2 info using npm@5.8.0
3 info using node@v6.8.1
4 info token getting list
5 http request ? GET https://registry.npmjs.org/-/npm/v1/tokens
6 http 401 ? Unauthorized (https://registry.npmjs.org/-/npm/v1/tokens)
7 verbose stack Error: Unable to authenticate, need: Basic, …Run Code Online (Sandbox Code Playgroud)