How do I resolve npm audit returning ENOAUDIT: Your configured registry does not support audit requests?
Asked Answered
S

2

21

This recently broke and I do not know what I might have done to break it beyond adding some additional dependencies. I am using https://registry.npmjs.org/ (the default). The relevant portion of the log file is below. Has anyone seen something similar? I've only seen this referenced in some old bug reports.

6 info audit Submitting payload of 66980 bytes
7 http fetch POST 500 https://registry.npmjs.org/-/npm/v1/security/audits 548ms
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 (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\lib\audit.js:172:18)
8 verbose stack     at tryCatcher (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
8 verbose stack     at Promise._settlePromiseFromHandler (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:512:31)
8 verbose stack     at Promise._settlePromise (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:569:18)
8 verbose stack     at Promise._settlePromise0 (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
8 verbose stack     at Promise._settlePromises (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\promise.js:689:18)
8 verbose stack     at Async._drainQueue (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:133:16)
8 verbose stack     at Async._drainQueues (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:143:10)
8 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\bluebird\js\release\async.js:17:14)
8 verbose stack     at runCallback (timers.js:694:18)
8 verbose stack     at tryOnImmediate (timers.js:665:5)
8 verbose stack     at processImmediate (timers.js:647:5)
9 verbose cwd C:\src\studio-template
10 verbose Windows_NT 10.0.17134
11 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\micha\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "audit"
12 verbose node v10.11.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.
Snead answered 28/11, 2018 at 18:13 Comment(1)
any explanation of what happened can get the bounty, considering it's no longer active. I'd still like to knowSnead
S
9

Apparently, this was a transitory error. I'm guessing npmjs had issues on their end.

Snead answered 3/12, 2018 at 18:12 Comment(0)
P
0

I see something similar when using npm v 6.14.6 with "overrides" in package.json

At first I thought the endpoint was rejecting my request because I had done so many iterations within a few hours. Then I tried removing "overrides" and "npm audit" started working again.


My goal was to resolve audit issues by changing package.json.

I did this by running "npm audit" to see the problem component versions, and the dependency tree that caused them to be included.

Then I updated the root component versions within package.json.

When this proved to not be enough I turned to the "overrides" section of package.json.

https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

If you need to make specific changes to dependencies of your dependencies, for example replacing the version of a dependency with a known security issue . . .

Presser answered 14/11, 2022 at 17:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.