【问题标题】:How to deploy create-react-app with typescript to Netlify when page returns 404页面返回 404 时如何将带有 typescript 的 create-react-app 部署到 Netlify
【发布时间】:2021-08-30 09:27:20
【问题描述】:

我的 Netlify 托管应用不断返回 404“未找到页面”。我已经尽可能简单地运行了:

【问题讨论】:

  • 我在该 URL 上看不到 404。我可以看到它加载了带有 reactjs 徽标和文本的虚拟内容
  • 谢谢。我只是设法让它工作。

标签: javascript typescript create-react-app netlify


【解决方案1】:

终于通过更改我的部署设置让它工作了。我改变了:

构建命令:CI= yarn run build

发布目录:./build

(我在部署日志中收到此错误: 10:30:26 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus './build' in the Netlify UI

这引出了一个问题“如果它已经在 netlify configuration file 中,你为什么不之前工作?”)

【讨论】:

    猜你喜欢
    • 2021-09-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-26
    • 2018-02-13
    • 2019-04-08
    • 1970-01-01
    • 2017-09-21
    相关资源
    最近更新 更多