首页 > 解决方案 > npm 在安装包时显示错误

问题描述

请查看这里的错误 我是 web 开发的新手,在学习 react.js 和安装 lite-server 时我遇到了这个问题。请帮我纠正它。

标签: javascriptreactjsnpmfrontendnpm-install

解决方案


进行以下更改:

1.运行这三个命令:

npm config set proxy http://localhost:8080/
npm config set https-proxy http://localhost:8080/
npm config set strict-ssl false```

它将指向 localhost:8080 并使用模块对其进行配置。

有关更多信息,请访问https://docs.npmjs.com/cli/config 完成上述更改后,运行以下命令:

  1. 现在运行以下命令: npm config edit

这将显示上面输入的三个语句,您只需将其删除并保存并关闭所有窗口并开始。


推荐阅读