react 脚手架 初始化项目

2020-02-19  本文已影响0人  梁庄十年
npm i yarn -g
yarn -v
yarn add create-react-app -g
create-react-app 项目名称
// 或
npx create-react-app 项目名称

如果上述方法失败,出现"Incorrect integrity when fetching from the cache" ,可以使用 yarn cache clean 解决,完成之后 在重新执行 初始化命令

关于npx相关的文章可以参考阮一峰教程http://www.ruanyifeng.com/blog/2019/02/npx.html

上一篇 下一篇

猜你喜欢

热点阅读