javascript - `npm audit` 不断返回 "Your configured registry (https://registry.npmjs.org/) does not support audit requests."。我如何让它再次工作?

标签 javascript node.js npm npm-audit

这是我得到的错误:

npm ERR! code ENOAUDIT
npm ERR! audit Your configured registry (https://registry.npmjs.org/) does not support audit requests.

使用日志文件:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'audit' ]
2 info using npm@6.4.1
3 info using node@v10.12.0
4 verbose npm-session 65e7a3436fc1253b
5 timing audit compress Completed in 25ms
6 info audit Submitting payload of 217372 bytes
7 http fetch POST 503 https://registry.npmjs.org/-/npm/v1/security/audits 13252ms
8 verbose stack Error: Your configured registry (https://registry.npmjs.org/) does not support audit requests.
8 verbose stack     at Bluebird.all.spread.then.catch (/usr/local/lib/node_modules/npm/lib/audit.js:172:18)
8 verbose stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
8 verbose stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
8 verbose stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
8 verbose stack     at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
8 verbose stack     at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:689:18)
8 verbose stack     at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
8 verbose stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
8 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
8 verbose stack     at runCallback (timers.js:705:18)
8 verbose stack     at tryOnImmediate (timers.js:676:5)
8 verbose stack     at processImmediate (timers.js:658:5)
9 verbose cwd /Users/danielhasegan/workspace/code
10 verbose Darwin 18.2.0
11 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "audit"
12 verbose node v10.12.0
13 verbose npm  v6.4.1
14 error code ENOAUDIT
15 error audit Your configured registry (https://registry.npmjs.org/) does not support audit requests.
16 verbose exit [ 1, true ]

我尝试了在 github 上找到的多个想法,但我没有设置任何 proxyhttp-proxy。两者都返回 null:

npm config get proxy
npm config get https-proxy

有什么想法吗?这不是暂时的,我已经有一段时间了。我发现我得到 503 很奇怪。这意味着我的连接有问题。

最佳答案

尝试运行 npm update,然后运行 ​​npm audit。这应该可以解决问题。

关于javascript - `npm audit` 不断返回 "Your configured registry (https://registry.npmjs.org/) does not support audit requests."。我如何让它再次工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54953917/

相关文章:

javascript - ajax POST 后无法访问 JQuery $(this)?

javascript - react .js : prevent logic in jsx and move render out of component

javascript - jQuery slideDown() 无法正确处理 AJAX 结果

javascript - 我正在尝试将 pdf 文件从 Node 服务器下载到 React 客户端,但是当我打开它时,它显示空白

javascript - 创建所有正则表达式匹配的数组?

javascript - Brain.js NaN 训练结果

node.js - 在 npm 和 git 中同步版本管理

javascript - RxJS - forkJoin 何时触发?

javascript - Node.js- "npm install express"错误 :0906D06C :PEM routines : PEM_read_bio npm

npm - 一个项目中有多个 npm 链接