【发布时间】:2019-01-15 05:22:51
【问题描述】:
我正在尝试在 github 上发布我的 react 应用程序。这是我遵循的步骤。
1-我已经在我的 Windows 上安装了 git。
2- 在 Visual Studios 终端中,我编写了 git init
3-然后我在 github 上创建了一个名为“cartdemo”的存储库
4-在我的 package.json 中,我更改了主页,将私有设为 false 并添加了“deploy”:“gh-pages -d build”
5- 再次在 VS 终端中,我编写了 git add 。
6-git commit -m "上线"
7-git远程添加源https://github.com/rahman23/cartdemo.git
8-git 推送
注意:这里你可以看到文件https://github.com/rahman23/cartdemo
但是,当我点击链接 https://rahman23.github.io/cartdemo/ 时,我会看到一个页面
购物车演示
这个项目是用 Create React App 引导的。
可用脚本
在项目目录下,可以运行:
npm 开始
在开发模式下运行应用程序。
打开http://localhost:3000在浏览器中查看。
如果您进行编辑,页面将重新加载。
您还会在控制台中看到任何 lint 错误。
我哪里做错了?
【问题讨论】: