无法部署反应应用程序

时间:2021-05-04 02:15:14

标签: reactjs git github github-pages

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

  1. 安装 NodeJS + GIT

  2. 在 Github 页面 (react-website-estate) 上创建一个新的仓库

  3. 在终端(VS Code)中:npm install gh-pages --save-dev

  4. 在 package.json 文件中,我添加了这些行

    { "主页": "http://simonpham-webdev.github.io/react-website-estate", "name": "react-website-estate", ...}

    “脚本”:{ "predeploy": "npm run build", "deploy": "gh-pages -d build", ... }

  5. git init

  6. git remote add origin https://github.com/simonpham-webdev/react-website-estate.git

  7. git status

  8. git add .

  9. git commit -m "deploy my react application"

  10. npm run deploy --> 然后登录github

  11. git push -u origin master

  12. 进入github页面设置并将分支更改为ma​​ster 这就是我得到的:https://simonpham-webdev.github.io/react-website-estate/

This is what I got

This the git path in the settings.json in case it has anything to do with the situation

图片附在上面的蓝色链接中 我将不胜感激 :( 提前致谢

0 个答案:

没有答案