【问题标题】:My app is failing to deploy to heroku [closed]我的应用程序无法部署到 heroku [关闭]
【发布时间】:2017-06-27 02:19:38
【问题描述】:

以下是我在终端中运行 git push heroku 时收到的错误。我正在使用 create-react-app Facebook 样板。如果您需要查看更多文件,请告诉我!

https://gist.github.com/dsopel94/1681fc1214c02190f1bf3bbcdf4987c2

【问题讨论】:

标签: node.js reactjs heroku


【解决方案1】:

我有一个使用 create-react-app 创建的 react 项目,我已成功部署到 heroku。我认为您设置的主要问题是 heroku 要求您在 package.json 中指定 npm 和节点版本。您可以通过在 package.json 中设置“engines”属性来做到这一点。

{
  "scipts" : ...,
  "proxy": ...,
  "engines": {
    "node": "6.9.1",
    "npm": "3.10.8"
  },
  //.. rest of package.json properties
}

【讨论】:

    猜你喜欢
    • 2017-08-27
    • 2018-12-12
    • 1970-01-01
    • 1970-01-01
    • 2017-12-05
    • 2015-10-25
    • 2020-07-09
    相关资源
    最近更新 更多