npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details

03-29 1649阅读 0评论

现象:打开项目,执行 npm install ,报错:

npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details,npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,安装,方法,第1张
(图片来源网络,侵删)

npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details

原因:

  • 猜测一:依赖包存在严重漏洞,需要更新

    解决方法:

    1.  npm audit fix
       npm audit fix --force
       npm audit
      

      1. npm audit fix : 扫描您的项目以了解漏洞,并自动安装任何与易受攻击的依赖关系兼容的更新

      2. npm audit fix --force :为主要依赖关系安装半主要更新

      npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details,npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,安装,方法,第3张
      (图片来源网络,侵删)

      3. npm audit:扫描您的项目以了解漏洞,只需显示详细信息,而无需修复任何内容:

      npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details

      意思: 有 14 个漏洞需要人工审查,需要手动安装。

      - 未解决

    2. 卸载 node,重新安装 - 成功解决

    3. 删除node_modules文件,重新npm install

      npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details,npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,安装,方法,第5张
      (图片来源网络,侵删)

      简单粗暴,但这次却没有效!!还是在报有漏洞。 - 未解决

    4. 使用 cnpm(淘宝镜像) - 未测验

      淘宝镜像源会自动修复,然后下载相关依赖包

      使用阿里定制的cnpm命令行工具代替默认的npm,输入以下代码

      npm install -g cnpm --registry=http://registry.npmmirror.com
      

      淘宝 npm 域名即将停止解析,npmmirror 镜像站大重构升级

      http://npm.taobao.org 和 http://registry.npm.taobao.org 将在 2022.06.30 号正式下线和停止 DNS 解析。检查是否安装成功:

       cnpm -v
      

      下一步:

      cnpm install
      
    5. 使用 yarn - 未测验

      下载:

      npm install yarn -g
      

      检查版本:

      yarn version
      

      安装:

      yarn
      

      运行:

      yarn run dev
      
  • 猜测二:提示的问题也不是错误

    解决方法:- 未测验

    1. npm install 报错 run `npm audit fix` to fix them, or `npm audit\` for details

      步骤一:其实上面的提示也已经给出了解决或者排除问题的方法,那就是紧接着上面提示的下面,输入命令行: npm fund

      步骤二:然后可以查看提示具体的提示内容,是依赖的打赏捐赠提示,然后再接着输入一行命令:npm run dev

      步骤三:回车就可以了,一般都是开发者捐赠支持的提示,打开一个github的链接之后,会显示需要打赏捐赠的信息,此时如果不想捐赠或者跳过这个提示的话,直接在后面加–no-fund即可,具体命令如下:npm install --no-fund


免责声明
本网站所收集的部分公开资料来源于AI生成和互联网,转载的目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,1649人围观)

还没有评论,来说两句吧...

目录[+]