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


 

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+

  

 

 

 

 

 

 

 4、启动

cd todolist
npm run start

  

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM