npx create-react-app my-app cd my-app npm start2.由GitHub取得程式碼後如何使用
下載後直接跑
npm run start錯誤訊息如下
'react-scripts' 不是內部或外部命令、可執行的程式或批次檔。
npm install react-scripts or npm install3.Can't resolve 'react-router-dom' in 非官方開發為React Router開發
npm install react-router-dom4.export 'Switch' (imported as 'Switch') was not found in 'react-router-dom'
6後改成Routes
npm install react-router-dom@5.2.0參考資料
建立全新的 React 應用程式
'react-scripts' 不是內部或外部命令,也不是可執行的程式 或批處理檔案--解決方案 Export 'Switch' (imported as 'Switch') was not found in 'react-router-dom'