VsCode搭建一个React项目

安装Node.js

使用 npm -v检查安装成功
image
目前的 node 中都会自带 npm 所以不需要重新下载 直接切换至淘宝镜像即可

1.临时使用 :npm --registry https://registry.npm.taobao.org install express

2.(推荐)持久使用:npm config set registry https://registry.npm.taobao.org

3.检查是否成功 npm config get registry 或npm info express
image

打开终端输入:npm install -g create-react-app react
image

接着就在你的工作区,创建一个你的React项目了
》create-react-app my-react-app 等待一段时间
image

按照提示输入

We suggest that you begin by typing:

  cd my-react-app
  npm start

接着自动打开:这个,说明项目构建完成·
image

posted on 2021-11-02 14:21  白嫖老郭  阅读(568)  评论(0编辑  收藏  举报

导航