您配置的注册中心不支持审计请求~关于 npm 审计

Your configured registry does not support audit requests ~ On npm audit

我有 1 个 "protobufjs": "git+https://github.com/danieldanielecki/protobufjs-angularfire.git#master" 形式的依赖项,即使用 npm install --save https://github.com/danieldanielecki/protobufjs-angularfire#master 安装。有什么方法可以将其包含在 npm audit 中吗?每当我尝试审核包时,我需要以这种方式获取包,我的 npm audit 失败并出现以下错误:

$ npm audit
npm ERR! code ENOAUDIT
npm ERR! audit Your configured registry (https://registry.npmjs.org/) does not support audit requests, or the audit endpoint is temporarily unavailable.

就 CI 而言,这真的很烦人,因为我的管道会失败。

此问题未通过 解决,在那里(或其他任何地方)未找到答案。

感谢@broofa 的快速测试和新想法,解决方案:

  1. rm -rf node_modules
  2. npm install
  3. npm install https://github.com/danieldanielecki/protobufjs-angularfire#master
  4. npm audit 再次工作!

node_modules 中存在一些不兼容问题或其他问题,我也删除了 npm-shrinkwrap.json 并生成了一个新的。