通過官方文檔:
npx create-react-app my-app
cd my-app
npm start / yarn start
報錯:
start: `react-scripts start`
解決:
項目根目錄,創(chuàng)建一個 .env 文件;
然后添加代碼:
SKIP_PREFLIGHT_CHECK=true
再次執(zhí)行
npm start / yarn start
通過官方文檔:
npx create-react-app my-app
cd my-app
npm start / yarn start
報錯:
start: `react-scripts start`
解決:
項目根目錄,創(chuàng)建一個 .env 文件;
然后添加代碼:
SKIP_PREFLIGHT_CHECK=true
再次執(zhí)行
npm start / yarn start