windowsan 安裝react腳手架

先查看是否安裝npm : npm -v

全局安裝create-react-app : npm install create-react-app -g

遇到錯誤:

npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or 
npm ERR! or that you lack permissions to access it.
image.png

解決辦法

  1. 找到 C:\Users\賬戶.npmrc 并刪掉.npmrc,這里要設(shè)置顯示隱藏文件才能看到。


    image.png

2.運行: npm cache clean --force

image.png

3.再次運行:npm install create-react-app -g 成功

image.png

創(chuàng)建項目:create-react-app testproject 遇到:npm ERR! code ERR_SOCKET_TIMEOUT

image.png

解決辦法: npm install rxjs 再次運行:create-react-app testproject 成功

image.png

vscode 安裝輔助插件


image.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容