乐趣区

关于react.js:info-There-appears-to-be-trouble-with-your-network-connection

应用 npx create-react-app 我的项目名 新建我的项目时,报错;

yarn add v1.22.4
info No lockfile found.
[1/4] ????  Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...

解决路径:

第一步:更换淘宝镜像

yarn config set registry https://registry.npm.taobao.org

第二步:按上面的操作

  1. 全局装置 nrm: npm install nrm -g;
  2. 查看镜像源: nrm ls;
  3. 切换镜像源: nrm use npm;
  4. 装置须要的模块: npm install <package-name>;
  5. 如果须要装置全副依赖: npm install;
退出移动版