【问题标题】:Meteor on Heroku DeploymentHeroku 部署上的 Meteor
【发布时间】:2017-01-19 05:34:12
【问题描述】:

我正在尝试将 Meteor 部署到远程 Heroku 服务器。我正在关注this 教程,但出现错误。任何建议将不胜感激。

当我做git push heroku master:

但是,服务器日志:

2016-09-11T18:03:14.757898+00:00 heroku[slug-compiler]: Slug compilation started
2016-09-11T18:03:14.757903+00:00 heroku[slug-compiler]: Slug compilation finished
2016-09-11T18:03:41.646676+00:00 heroku[web.1]: Starting process with command `node build/bundle/main.js`
2016-09-11T18:03:44.098961+00:00 app[web.1]: 
2016-09-11T18:03:44.099230+00:00 app[web.1]: assert.js:93
2016-09-11T18:03:44.099458+00:00 app[web.1]:   throw new assert.AssertionError({
2016-09-11T18:03:44.101174+00:00 app[web.1]: AssertionError: "undefined" === "function"
2016-09-11T18:03:44.101176+00:00 app[web.1]:     at Object.<anonymous> (/app/build/bundle/programs/server/mini-files.js:108:24)
2016-09-11T18:03:44.101177+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2016-09-11T18:03:44.101178+00:00 app[web.1]:     at Module.load (module.js:356:32)
2016-09-11T18:03:44.101179+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2016-09-11T18:03:44.101180+00:00 app[web.1]:     at Module.require (module.js:364:17)
2016-09-11T18:03:44.173228+00:00 heroku[web.1]: Process exited with status 8
2016-09-11T18:03:44.193642+00:00 heroku[web.1]: State changed from starting to crashed
2016-09-11T18:03:44.194826+00:00 heroku[web.1]: State changed from crashed to starting
2016-09-11T18:04:02.230596+00:00 heroku[web.1]: Starting process with command `node build/bundle/main.js`
2016-09-11T18:04:04.559800+00:00 heroku[web.1]: Process exited with status 8
2016-09-11T18:04:04.471328+00:00 app[web.1]: 
2016-09-11T18:04:04.471593+00:00 app[web.1]: assert.js:93
2016-09-11T18:04:04.473451+00:00 app[web.1]:     at wrapPathFunction (/app/build/bundle/programs/server/mini-files.js:77:10)
2016-09-11T18:04:04.473452+00:00 app[web.1]:     at Object.<anonymous> (/app/build/bundle/programs/server/mini-files.js:108:24)
2016-09-11T18:04:04.473453+00:00 app[web.1]:     at Module._compile (module.js:456:26)
2016-09-11T18:04:04.473454+00:00 app[web.1]:     at Function.Module._load (module.js:312:12)
2016-09-11T18:04:04.473455+00:00 app[web.1]:     at Module.require (module.js:364:17)
2016-09-11T18:04:04.581922+00:00 heroku[web.1]: State changed from starting to crashed

更新

我现在用香草流星应用尝试this tutorial

meteor create meteor-thewhozoo

但是当我尝试将push 发送到 Heroku 服务器时:

我了解到添加 Mongo 数据库可以消除对信用卡信息的请求,但它对我不起作用。

heroku config:set MONGO_URL=mongodb://<dbname>:<password>@ds021026.mlab.com:21026/mongo-thewhozoo

我想避免为开发环境/概念证明提供我的卡片详细信息。

更新

可以避免卡片细节。阅读this,(请参阅设置构建回)。

【问题讨论】:

  • 我在 Heroku 上创建了另一个 Meteor 应用程序,但不知道如何访问它,或者测试它是否正在运行。如果有人可以建议,请参阅stackoverflow.com/questions/39413119/…

标签: meteor heroku npm


【解决方案1】:

前几天我第一次尝试将我的流星应用程序部署到 Heroku。我按照本教程进行操作,没有问题。

https://medium.com/@gautham.gg/deploy-a-meteor-1-3-application-to-heroku-cda1f68ca20a#.wceub1sm3

希望这会有所帮助。

【讨论】:

  • 同样的错误还是不同的错误?只是为了检查您是否添加了流星构建包?
  • 我收到以下错误:'Push denied to meteor-thewhozoo'。我将在上面的问题中添加更新。谢谢
【解决方案2】:

您无需使用数据库的 mlab 沙箱选项添加卡片详细信息,这将为您提供 500MB 的 slug 大小(这对于开发环境来说绰绰有余)。

您可以使用以下命令从 heroku cli 中选择 mlab 沙箱数据库。

$ heroku addons:create mongolab:sandbox

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-20
    • 1970-01-01
    • 2016-07-22
    • 2016-02-23
    • 1970-01-01
    • 2014-09-24
    相关资源
    最近更新 更多