2015-09-21 99 views
1

当我部署Clojure应用程序时,我需要在Heroku中的节点程序(NodeJS)出现在我的dynos中。我的应用程序不是一个NodeJS应用程序,例如它不能有一个package.json,我不希望Heroku验证它是否是有效的NodeJS应用程序(不是,它是一个Clojure应用程序)。将NodeJS添加到Heroku的Clojure应用程序

达到此目的的方法是什么?

我试着设置了明确的buildpacks:

$ 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

尝试添加一个package.json文件到您的项目与这些内容:

{} 

Node.js buildpack必须检测到这个最小配置才能运行。

确保package.json文件也承诺给Git。

+0

我真的不希望Heroku以任何方式运行Node.js。我的Clojure应用程序将触发它。此外,将有package.json帮助Heroku运行我的Clojure应用程序? – Pablo

+0

使用空的'package.json'节点步骤基本上是空操作。 buildpack将安装Node.js并设置环境,以便在构建或运行时使用'node'。 – codefinger

+0

此外,这是你的构建可能失败的地方:https://github.com/heroku/heroku-buildpack-nodejs/blob/master/bin/detect#L5 – codefinger

相关问题