Mean.io 0.5.5 Heroku部署问题

时间:2016-01-14 20:40:05

标签: heroku mean-stack mean.io

尝试将一个mean.io应用程序部署到Heroku并遇到各种各样的挑战

Here are a few things I tried (Github Issue)

  • 首先,我必须将我的dyno内存增加到1GB +或应用程序 崩溃。
  • 接下来我必须解析missing modules并告诉heroku不要缓存node_modules
    • npm i -S ms kerberos connect-modrewrite
    • npm update --save
    • 部署
    • heroku config:set NODE_MODULES_CACHE=false
  • 最后我不得不set the CPU count to 2,因为应用程序仍然需要 很多记忆。
  • heroku config:set CPU_COUNT=2

应用程序失败,因为aggregated.js缺少packages / custom / folders中的bower文件。如何在heroku上运行mean postinstall

1 个答案:

答案 0 :(得分:1)

回答后人的问题。

解决投球手依赖性问题

我有一些自定义包,它们是在新的包脚手架系统bower install作为postinstall命令之前创建的。将此添加到任何依赖于bower依赖关系的自定义包。

  "scripts": {
    "postinstall" : "bower install"
  }

现在推送到heroku会在每个包目录中运行npm / bower,一切都很顺利。

相关问题