Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs Can';t部署react应用程序_Reactjs_Git_Github_Github Pages - Fatal编程技术网

Reactjs Can';t部署react应用程序

Reactjs Can';t部署react应用程序,reactjs,git,github,github-pages,Reactjs,Git,Github,Github Pages,我已经尝试了很多次,但仍然无法部署我的react应用程序。以下是我采取的所有步骤: 安装NodeJS+GIT 在Github页面上创建新存储库(react网站) 在终端中(VS代码):npm安装gh页面——保存开发 在package.json文件中,我添加了以下行 { “主页”:http://simonpham-webdev.github.io/react-website-estate", “名称”:“react网站财产”, …} “脚本”:{ “预部署”:“npm运行构建”, “部署”:

我已经尝试了很多次,但仍然无法部署我的react应用程序。以下是我采取的所有步骤:

  • 安装NodeJS+GIT

  • 在Github页面上创建新存储库(react网站)

  • 在终端中(VS代码):npm安装gh页面——保存开发

  • 在package.json文件中,我添加了以下行

    { “主页”:http://simonpham-webdev.github.io/react-website-estate", “名称”:“react网站财产”, …}

    “脚本”:{ “预部署”:“npm运行构建”, “部署”:“gh页面-d构建”, ... }

  • git init

  • git远程添加源https://github.com/simonpham-webdev/react-website-estate.git

  • git状态

  • git添加。

  • git commit-m“部署我的react应用程序”

  • npm运行部署
    -->然后登录github

  • git-push-u原始主机

  • 进入github页面设置,并将分支更改为master,这就是我得到的结果:

  • 图片附在上面的蓝色链接中
    我非常感谢您的帮助:(提前感谢

    当您运行
    npm run deploy
    时是否有任何错误,并且在部署后您实际上不需要推送您的repo否。没有错误。我遵循了youtube上的教程,但页面无法部署