`npm audit` keeps returning "Your configured registry (https://registry.npmjs.org/) does not support audit requests.". How do I make it work again?
Solution 1
Try running npm update
and then npm audit
. This should fix the problem.
Solution 2
You could have it when in your package.json
you have something like "PACKAGE_NAME": "github:USERNAME/PACAKGE_NAME"
, or any other different pattern rather than the typical one, i.e. "PACKAGE_NAME": "PACKAGE_VERSION"
.
Solution 3
First
npm install -g npm
then
npm audit
may solve your problem
Solution 4
i have tried all the answers mentioned but no luck.
it works for me only when i removed both node_modules
and package-lock.json
after that i run npm install
and then npm audit fix
then it worked
Related videos on Youtube
Daniel Hasegan
Updated on July 09, 2022Comments
-
Daniel Hasegan almost 2 years
Here is the error I get:
npm ERR! code ENOAUDIT npm ERR! audit Your configured registry (https://registry.npmjs.org/) does not support audit requests.
with the log file:
0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'audit' ] 2 info using [email protected] 3 info using [email protected] 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 ]
I tried multiple ideas found across github but I do not have any
proxy
orhttp-proxy
set. both of those returnnull
:npm config get proxy npm config get https-proxy
Any ideas? This is not transitory, ive been getting it for a while now. I find it weird I get
503
. It means something is wrong with my connection.-
נשמה קשוחה about 5 yearsMaybe this is happening again?
-
shadowspawn about 5 yearsAre you in the Dublin region? There is an open incident on the status page, although symptoms are different than your issue: status.npmjs.org
-
Daniel Hasegan about 5 yearsNo, this is in San Francisco. I've been having it for weeks now.
-
llamacorn almost 5 yearsI'm also encountering this issue. Anyone find a solution? I tried: npm remove nodemon npm install --save-dev nodemon npm audit fix Other have reported this fixing their issue. However this doesn't fix mine.
-
Daniel Hasegan almost 5 years@llamacorn why do you think
nodemon
was the issue? Can you point to the place where people were talking about that? I am thinking that its either a weird package or the package-lock file is too large. -
llamacorn almost 5 years@DanielHasegan I tried a few things found. This is one of the resources I was using, however it did not solve my issue. npm.community/t/npm-audit-fails-with-enoaudit-on-500-response/…
-
-
Daniel Hasegan almost 5 yearsNope, it didn't work. do you mean i should update my node to latest for this to work?
-
Gökhan Ayhan almost 5 yearsI take this solution from a github issue, and it worked for me. Maybe you should deeply search what is the problem.
-
Daniel Hasegan over 4 yearsthats it dude! Thanks
-
Daniel Hasegan over 4 yearsActually I think it fixed itself with a new version of NPM
-
Troglo over 4 yearsI had the same problem with an invalid repository URL. The problem was solved after fixing the URL
"repository": { "type": "git", "url": "https://domain/path/repo.git" }
-
Carmine Tambascia over 4 yearsI have this issue trying to run the final version of this github.com/VelizarMihaylov/medium-keystone-react-cms, but there is not such patter in that, so I would assume this is really the issue
-
pawan nepal about 4 yearsfirst run "npm audit" then run "npm audit fix". The reason being not all could be fixed automatically, some may need manual fix.
-
Gwater17 about 4 yearsIn case it was unclear updating npm let me run npm audit fix too.
-
Mathix420 about 4 yearsnpm update is not updating npm but your dependencies
-
Daniel Danielecki over 3 years@DanielHasegan, have you unaccepted this answer after... 1+ year? :-|
-
Lazor over 3 yearsHi Stephen, any other ideas? I used those steps with no luck: delete the node_modules folder, npm install, npm update, npm audit. I get the error "socker hang up", "audit endpoint returned an error". It seems like I can do everything other than perform an audit on the latest version of npm. I'm wondering if this is somehow related to trying this in Windows Subsystem for Linux. It happens in Ubuntu and Debian. I can use wget successfully from to access websites.
-
Stephen Lead over 3 yearsSorry, no idea - I'm definitely not an expert in this area
-
bernieslearnings almost 3 yearsThis is just dangerous, updating your dependencies could cause havoc for people
-
Don over 2 yearsi'm getting the same problem with the same reasoning when I revert from atypical to typical it does not error. I need to use the atypical as the original dependencies are no longer supported.
-
bmaupin about 2 yearsI'm upvoting this because in my case, I got this same error due to a broken
package-lock.json
file, caused by a botched merge Renovate had made. The error message makes it sound like there's something wrong with the npm registry when the issue was on my end the whole time.