NPM throws error on "audit fix" - Configured registry is not supported
Asked Answered
H

2

0

Since last night i'm getting the following error:

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

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ransinha/.npm/_logs/2018-11-28T18_19_35_432Z-debug.log

I have not made any recent changes. https://github.com/verdaccio/verdaccio/issues/689 suggests changeing in config.yaml file. I don't see any config.yaml file in my folder. I'm not using verdaccio also. Not sure how to fix this. Any ideas?

Update: The npm audit shows the following:

                   === npm audit security report ===                        

┌───────────────────────────────────────────────────────────────────────── │ Manual Review │ │ Some vulnerabilities require your attention to resolve
│ Visit https://go.npm.me/audit-guide for additional guidance │ └───────────────────────────────────────────────────────────────────────── ┌───────────────┬───────────────────────────────────────────────────────── │ Critical │ Malicious Package │ ├───────────────┼───────────────────────────────────────────────────────── │ Package │ flatmap-stream │ ├───────────────┼───────────────────────────────────────────────────────── │ Patched in │ No patch available │ ├───────────────┼───────────────────────────────────────────────────────── │ Dependency of │ nodemon [dev] │ ├───────────────┼───────────────────────────────────────────────────────── │ Path │ nodemon > pstree.remy > ps-tree > event-stream > │ │ │ flatmap-stream │ ├───────────────┼───────────────────────────────────────────────────────── │ More info │ https://nodesecurity.io/advisories/737

Hernadez answered 28/11, 2018 at 18:26 Comment(2)
what does npm audit showDoublespace
Which Npm version do you use?Pith
D
2

Based the more info link, you are advised to use [email protected]

To do this:

1, Delete the node_modules folder of flatmap-stream

2, Edit package-lock.json file, i think under ps_tree object and add/edit the dependencies as shown below:

"requires": {
    "event-stream": "~3.3.0"
},
"dependencies": {
    "event-stream": {
        "version": "3.3.4"
    }
}

Run npm install again, this should fix it

Doublespace answered 29/11, 2018 at 11:12 Comment(0)
I
1

Delete package-lock.json and do npm i works for me.

Iq answered 27/7, 2021 at 7:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.