react 基础2-安装成功

在文件夹路径下打开cmd

注:这方法可能就我自己觉着省事儿,聊作借鉴

安装成功后,直接关闭管理员权限的命令行
在项目所在的文件夹下,把文件夹路径删掉,打 cmd 然后敲回车

1、文件夹路径 ↓ ↓ ↓
文件夹路径示例

2、选中文件夹路径 ↓ ↓ ↓
选中文件夹路径

3、嵌入cmd ↓ ↓ ↓
嵌入cmd

4、打开该路径下的cmd ↓ ↓ ↓
打开该路径下的cmd


5、创建项目↓ ↓ ↓

D:\git_work2\reactProject>create-react-app myFirstReact
Could not create a project called "myFirstReact" because of npm naming restrictions:
  *  name can no longer contain capital letters

so,不接受大写字母~↑↑↑

D:\git_work2\reactProject>create-react-app myfirstreact
Creating a new React app in D:\git_work2\reactProject\myfirstreact.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

现在好了↑↑↑

+ react-scripts@2.1.1
+ react@16.6.3
+ react-dom@16.6.3
added 1701 packages in 99.851s

Success! Created myfirstreact at D:\git_work2\reactProject\myfirstreact
Inside that directory, you can run several commands:

  npm start
    Starts the development server.

  npm run build
    Bundles the app into static files for production.

  npm test
    Starts the test runner.

  npm run eject
    Removes this tool and copies build dependencies, configuration files
    and scripts into the app directory. If you do this, you can’t go back!
    We suggest that you begin by typing:

  cd myfirstreact
  npm start

Happy hacking!

D:\git_work2\reactProject>cd myfirstreact

D:\git_work2\reactProject\myfirstreact>npm start

> myfirstreact@0.1.0 start D:\git_work2\reactProject\myfirstreact
> react-scripts start
Starting the development server...
Compiled successfully!

You can now view myfirstreact in the browser.

  Local:            http://localhost:3000/
  On Your Network:  http://10.6.24.255:3000/

Note that the development build is not optimized.
To create a production build, use npm run build.

over↑↑↑

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值