NPM 在“审计修复"上抛出错误;- 不支持配置的注册表 [英] NPM throws error on "audit fix" - Configured registry is not supported
问题描述
从昨晚开始,我收到以下错误:
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
我最近没有进行任何更改.https://github.com/verdaccio/verdaccio/issues/689 建议更改config.yaml 文件.我的文件夹中没有看到任何 config.yaml 文件.我也没有使用 verdaccio.不知道如何解决这个问题.有什么想法吗?
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?
更新:npm 审计显示以下内容:
Update: The npm audit shows the following:
=== npm audit security report ===
┌──────────────────────────────────────────────────────────────────────────────│ 人工审核 ││ 一些漏洞需要您注意解决
│ 访问 https://go.npm.me/audit-guide 获取更多指导 │└──────────────────────────────────────────────────────────────────────────────┌──────────────────┬────────────────────────────────────────────────────────────│ 严重 │ 恶意包 │├────────────────┼────────────────────────────────────────────────────────────│ 封装 │ flatmap-stream │├────────────────┼────────────────────────────────────────────────────────────│ 已打补丁 │ 无可用补丁 │├────────────────┼────────────────────────────────────────────────────────────│ 依赖 │ nodemon [dev] │├────────────────┼────────────────────────────────────────────────────────────│ 路径│ nodemon > pstree.remy > ps-tree > event-stream > ││ │ flatmap-stream │├────────────────┼────────────────────────────────────────────────────────────│ 更多信息 │ https://nodesecurity.io/advisories/737 │
┌─────────────────────────────────────────────────────────────────────────
│ 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 │
推荐答案
根据more info链接,建议使用event-stream@3.3.4
Based the more info link, you are advised to use event-stream@3.3.4
要做到这一点:
1、删除flatmap-stream的node_modules文件夹
1, Delete the node_modules folder of flatmap-stream
2、编辑 package-lock.json 文件,我认为在 ps_tree 对象下并添加/编辑依赖项,如下所示:
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"
}
}
再次运行 npm install,应该可以解决
Run npm install again, this should fix it
这篇关于NPM 在“审计修复"上抛出错误;- 不支持配置的注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!