当我部署Clojure应用程序时,我需要节点程序(NodeJS)出现在Heroku中的dynos中。我的应用程序是不是的NodeJS应用程序,它不能有例如的package.json和我不'不想的Heroku以验证它是否' s一个有效的NodeJS应用程序或没有(IT' s不是,它&#39 ; Clojure app)。
实现这一目标的方法是什么?
我尝试设置显式构建包:
$ heroku buildpacks
=== projectx Buildpack URLs
1. https://github.com/heroku/heroku-buildpack-nodejs
2. https://github.com/heroku/heroku-buildpack-clojure
但仍然在部署时收到此错误消息:
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Multipack app detected
remote: -----> Fetching custom git buildpack... done
remote:
remote: ! Push rejected, failed to detect
在日志上我可以看到:
2015-09-21T10:56:07.731335+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-21T10:56:07.731344+00:00 heroku[slug-compiler]: Slug compilation failed: no Cedar-supported app detected
2015-09-21T10:56:07.731346+00:00 heroku[slug-compiler]: HINT: This occurs when Heroku cannot detect the buildpack
2015-09-21T10:56:07.731347+00:00 heroku[slug-compiler]: to use for this application automatically.
2015-09-21T10:56:07.731348+00:00 heroku[slug-compiler]: See https://devcenter.heroku.com/articles/buildpacks
2015-09-21T10:58:07.541720+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-21T10:58:07.541729+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect
2015-09-21T11:00:28.651321+00:00 heroku[slug-compiler]: Slug compilation started
2015-09-21T11:00:28.651329+00:00 heroku[slug-compiler]: Slug compilation failed: failed to detect
答案 0 :(得分:0)
尝试使用以下内容将package.json
文件添加到项目中:
{}
Node.js buildpack必须检测此最小配置才能运行。
确保package.json
文件也提交给Git。
答案 1 :(得分:0)
您可以将自定义构建文件用于override the default build behavior的Clojure buildpack,因此它还会安装NodeJS。随意使用我bin/build项目中的cljsnode。