我正在尝试在github.Here上发布我的react应用程序,这是我遵循的步骤。
1-我已经在我的windows上安装了git。
2-在Visual Studios终端中,我编写了git init
3-然后我在github上创建了一个名为"cartdemo“的存储库
4-在我的package.json中,我更改了主页,将私有设置为假,并添加了"deploy":"gh-pages -d build“
5-同样在VS终端中,我已经写了git add。
6-git提交-m“上线”
7-git远程添加源https://github.com/rahman23/cartdemo.git
8-git推流
注意:在这里您可以看到文件https://github.com/rahman23/cartdemo
但是,当我点击链接https://rahman23.github.io/cartdemo/时,我会看到一个页面,上面写着它
cartdemo
此项目是使用Create React App引导的。
可用脚本
在项目目录中,您可以运行:
npm启动
在开发模式下运行应用程序。
打开http://localhost:3000以在浏览器中查看它。
如果您进行编辑,页面将重新加载。
您还将在控制台中看到任何lint错误。
我哪里做错了?
发布于 2019-01-15 04:58:41
在第8步中,您需要告诉git将项目推送到哪个存储库和分支。既然你添加了一个原点,你就会...
git push origin master
由于项目现在已被推送,因此将其添加到您的package.json文件中。"homepage" : "http://rahman23.github.io/cartdemo"
然后在控制台中运行:yarn build
,并尝试再次推送它...
https://stackoverflow.com/questions/54188540
复制相似问题