NPM 在 "audit fix" 上抛出错误 - 不支持配置的注册表

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

从昨晚开始,我收到以下错误:

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。不知道如何解决这个问题。有什么想法吗?

更新: npm 审核显示以下内容:

                   === npm audit security report ===                        

┌────────────────────────────────────────── ────────────────────────────── │ 人工审核 │ │ 部分漏洞需要您关注解决
│ 访问 https://go.npm.me/audit-guide 以获得更多指导 │ └────────────────────────────────────────────── ────────────────────────── ┌────────────────┬──────────────────────────────── ────────────────────────── │ 严重 │ 恶意包 │ ├────────────────┼──────────────────────────────── ────────────────────────── │ 包 │ flatmap-stream │ ├────────────────┼──────────────────────────────── ────────────────────────── │ 已打补丁 │ 没有可用的补丁 │ ├────────────────┼──────────────────────────────── ────────────────────────── │ 依赖 │ nodemon [dev] │ ├────────────────┼──────────────────────────────── ────────────────────────── │ 路径 │ nodemon > pstree.remy > ps-tree > 事件流 > │ │ │ 平面图流 │ ├────────────────┼──────────────────────────────── ────────────────────────── │ 更多信息 │ https://nodesecurity.io/advisories/737

根据更多信息link,建议使用event-stream@3.3.4

为此:

1、删除flatmap-streamnode_modules文件夹

2、编辑package-lock.json文件,我觉得在ps_tree对象和add/edit下的依赖关系如下图:

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

运行 npm install 再次安装,应该可以修复

删除 package-lock.json 并为我做 npm i