创建React项目

这篇博客介绍了如何在Windows环境下使用create-react-app快速创建并启动一个React项目。首先全局安装create-react-app,然后使用该工具新建项目,并确保项目名称全为小写。接着进入项目目录,最后通过npm start命令启动项目。
摘要由CSDN通过智能技术生成
  1. win+R键打开cdm
  2. npm install -g create-react-app    全局安装

    D:\webstormworkspace>npm install -g create-react-app
    npm WARN deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
    
    changed 67 packages in 8s
  3. create-react-app 项目名称       新建并对react项目进行命名(注:项目名称不能有大写)==>> 请先进入到项目要存放的位置)

    
    D:\webstormworkspace>create-react-app text
    
    Creating a new React app in D:\webstormworkspace\text.
    
    Installing packages. This might take a couple of minutes.
    Installing react, react-dom, and react-scripts with cra-template...
    
    
    added 1354 packages in 2m
    
    Initialized a git repository.
    
    Installing template dependencies using npm...
    npm WARN deprecated source-map-resolve@0.6.0: See https://github.com/lydell/source-map-resolve#deprecated
    
    added 39 packages in 12s
    Removing template package using npm...
    
    
    removed 1 package in 7s
    Git c
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值