當我部署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
我真的不希望Heroku以任何方式運行Node.js。我的Clojure應用程序將觸發它。此外,將有package.json幫助Heroku運行我的Clojure應用程序? – Pablo
使用空的'package.json'節點步驟基本上是空操作。 buildpack將安裝Node.js並設置環境,以便在構建或運行時使用'node'。 – codefinger
此外,這是你的構建可能失敗的地方:https://github.com/heroku/heroku-buildpack-nodejs/blob/master/bin/detect#L5 – codefinger