在 NodeJs 上搭建 React 开发环境]
-
安装一个node.js 地址:
-
在安装node.js完成时会默认安装npm,在cmd命令窗口先用cd指令找到你想创建的目录下,再运行以下三条指令
-
npm install -g yarn
-
npm install -g create-react-app
-
create-react-app xx (xx指的是你自己创建项目的名字)
-
-
运行 yarn start
npm install -g yarn
npm install -g create-react-app
create-react-app xx (xx指的是你自己创建项目的名字)
运行 yarn start