javascript - npm 在安装包时显示错误
问题描述
请查看这里的错误 我是 web 开发的新手,在学习 react.js 和安装 lite-server 时我遇到了这个问题。请帮我纠正它。
解决方案
进行以下更改:
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 完成上述更改后,运行以下命令:
- 现在运行以下命令:
npm config edit
这将显示上面输入的三个语句,您只需将其删除并保存并关闭所有窗口并开始。
推荐阅读
- python - 如何正确替换 sympy 中的索引变量?
- c++ - 如何从qt中的类调用方法?
- pyomo - Pyomo 加载函数
- review - Chad Hutchison Thomas - 开发一个像 Trustpilot 这样的评论网站
- php - 在 drupal 8 中调用服务方法的区别
- advanced-installer - 如何修复 Advanced Installer 中的无效文件格式
- node.js - 检查 Mongo 中的字段是否包含多个值
- visual-studio - 无法加载文件或程序集“Mono.Cecil.Pdb”VS17
- android - 调用 onTrimMemory() 方法时如何重置/重新启动应用程序?
- java - 如何使用 RxJava 1.x 进行 takeUntil 与必须调用具有不同数据的每个页面的分页?