以管理員身份運行cmd
切換npm源:
npm config set registry https://registry.npm.taobao.org
切換yarn源:
yarn config set registry https://registry.npm.taobao.org
安裝或更新create-react-app版本:
npm i -g create-react-app
查看create-react-app版本
create-react-app -V
使用create-react-app腳手架創建React應用程序:
npx create-react-app my-app
運行剛才創建的應用:
cd my-app
yarn start
