尝试将一个mean.io应用程序部署到Heroku并遇到各种各样的挑战
Here are a few things I tried (Github Issue)
node_modules
npm i -S ms kerberos connect-modrewrite
npm update --save
heroku config:set NODE_MODULES_CACHE=false
heroku config:set CPU_COUNT=2
应用程序失败,因为aggregated.js缺少packages / custom / folders中的bower文件。如何在heroku上运行mean postinstall
?
答案 0 :(得分:1)
回答后人的问题。
我有一些自定义包,它们是在新的包脚手架系统bower install
作为postinstall命令之前创建的。将此添加到任何依赖于bower依赖关系的自定义包。
"scripts": {
"postinstall" : "bower install"
}
现在推送到heroku会在每个包目录中运行npm / bower,一切都很顺利。