1.首先拉取好react项目后,在cmd命令框中进到对应的项目路径
2. 命令行输入node -v,npm -v命令,查看对应的版本,如下图
3. 输入npm install命令 来安装依赖(需要一段时间等待)
注意!!!如果项目时间比较久,可能出现各种各样的问题,我在这一步就遇到了问题(如下图)
执行下面的命令
npm config get proxy
npm config get https-proxy
如果返回的不是null,则执行下面对命令清理;如果返回的是null,直接跳过这一步
npm config set https-proxy null
npm config set proxy null
重新设置
npm config set registry https://registry.npmjs.org/