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