react 脚手架的安装,项目启动,,,,。。


之前安装了多次react脚手架。。。在创建项目的时候都失败了。。。可能是因为网速问题吧,,最后通过淘宝镜像成功安装。。

步骤如下:

通过 npm 使用 React:

第一步 : 安装 设置淘宝镜像

$ npm install -g cnpm --registry=https://registry.npm.taobao.org $ npm config set registry https://registry.npm.taobao.org


第二步: 安装react脚手架,并启动
$ cnpm install -g create-react-app //全局安装脚手架 $ create-react-app my-app1 //创建一个脚手架 my-app1是项目名 $ cd my-app/  $ npm start


成功安装 :目录结构如下

 

 

  npm run start 启动。。。。

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM