node版本10.14.2 下载地址

如果是其版本的话会出错 css-loader 会不兼容 主要是8.x的版本不兼容

npm install -g create-react-app 全局安装 create-react-app

create-react-app react_app 使用create-react-app安装一个react脚手架 文件夹为 react_app

D:\>create-react-app react_app

Creating a new React app in D:\react_app.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts... yarn add v1.12.3
[/] Resolving packages...
[/] Fetching packages...
info [email protected].: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[/] Linking dependencies...
[/] Building fresh packages... success Saved lockfile.
success Saved new dependencies.
info Direct dependencies
├─ [email protected].
├─ [email protected].
└─ [email protected].
info All dependencies
├─ [email protected].
├─ [email protected].
├─ [email protected].
├─ [email protected].
├─ [email protected].
└─ [email protected].
Done in .77s. Success! Created react_app at D:\react_app
Inside that directory, you can run several commands:

表示安装成功

yarn start 或者 npm run start 启动项目

05-28 21:23