1、查看npm的镜像源

npm config get registry
// 默认是:https://registry.npmjs.org/

  

2、修改成淘宝的镜像源

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

  

3、create-react-app创建项目

npx create-react-app todolist
// npx comes with npm 5.2+,可以直接使用 npx create-react-app
// 也可以使用 npm init react-app todolist         --需要 npm 6+

  

 

npx create-react-app命令不成功,更改成淘宝镜像

 

 

 

 

npx create-react-app命令不成功,更改成淘宝镜像

 

 4、启动

cd todolist
npm run start

  

 

相关文章:

  • 2021-07-24
  • 2022-12-23
  • 2022-02-09
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
猜你喜欢
  • 2021-12-15
  • 2021-09-02
  • 2021-05-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案