create-react-app安裝出錯問題解決

在用create-react-app的時候react

報錯npm

錯誤以下圖:app

在SF上查到說是或許是由於國內npm拉去資源,拉去不到的問題,能夠試着從解決建立create-react-app慢的方法着手:spa

解決方法:

//換源
npm config set registry https://registry.npm.taobao.org
//配置後經過如下方法驗證是否成功
npm config get registry

 

設置成功後,再次執行create-react-app,固然成功啦3d

相關文章
相關標籤/搜索