4

I have build my first NodeJS app with Express and am running it on C9 without any issues.

The app uses a Node Package (easy-pdf-merge) which requires at least Java 6.

On pushing my code up to Heroku I get an error at the point of the merge process saying I don't have Java install on this Dyno.

I have read a little about buildpacks but I'm not sure on the direction here.

Unless there is a simpler way to merge PDFs of course.

Thanks

Stu

1 Answer 1

11

Run the following command:

$ heroku buildpacks:clear
$ heroku buildpacks:add heroku/jvm
$ heroku buildpacks:add heroku/nodejs

Then redeploy by running

$ git commit -m "redeploy" --allow-empty
$ git push heroku master

After the build, the JVM will be installed in your app, and available for use.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks. The build succeeded but am now getting an error in the bowser, Standard Heroku "Application Error". This is the build result. Wondering if I need to make any other settings clarifications prior to build. ------> devcenter.heroku.com/articles/… -----> Build succeeded! -----> JVM Common app detected -----> Installing JDK 1.8... done -----> Discovering process types Procfile declares types -> (none) -----> Compressing... Done: 100.8M -----> Launching... Released v26
oh, you probably need the jvm buildpack to be the first buildpack. I'll edit my answer
Thanks very much, a little more testing to do but looks to have worked a treat. Thanks for the quick feedback too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.