react 环境搭建

1.安装yarn

npm install -g yarn --registry=https://registry.npm.taobao.org

yarn config set registry https://registry.npm.taobao.org -g

yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

yarn config set prefix "D:\Program Files\nodejs\node-global"
yarn config set cache "D:\Program Files\nodejs\node-cache"

2.安装react
yarn add react
yarn remove react
yarn add react --dev
yarn upgrade

------
npm install react
npm uninstall react
npm install react --save-dev
npm update

3.安装create-react-app
yarn add create-react-app -g
create-react-app my-app
--
npm install -g create-react-app

posted on 2021-06-09 08:12  biind  阅读(55)  评论(0编辑  收藏  举报