【问题标题】:"Could not find a required file. remote: Name: index.html" This the error I get whenever I deploy my ReactJS app via Heroku, Zeit/Now or Netlify“找不到所需的文件。远程:名称:index.html” 这是每当我通过 Heroku、Zeit/Now 或 Netlify 部署我的 ReactJS 应用程序时遇到的错误
【发布时间】:2020-12-25 11:16:23
【问题描述】:

我使用 create-react-app 实用程序创建了我的 react 应用程序,该实用程序默认将 index.html 文件放在公共文件夹中。我没有从那里移动它,它与 repo link to the public folder 中的方式完全相同。我已经检查了我的 .gitignore 以确保它没有忽略 index.html。我已经运行 npm install 以确保所有依赖项都到位。这是我当前的目录结构。不确定问题是什么,并尝试了所有建议的故障排除方法。

这是我的目录结构

【问题讨论】:

    标签: reactjs heroku web-deployment netlify zeit-pkg


    【解决方案1】:

    您很可能需要将您的公用文件夹移动到当前目录之外的项目的路由路径

    【讨论】:

      猜你喜欢
      • 2020-05-05
      • 2020-12-28
      • 1970-01-01
      • 1970-01-01
      • 2021-03-14
      • 2018-12-27
      • 1970-01-01
      • 2022-01-24
      • 1970-01-01
      相关资源
      最近更新 更多