2

I have tried so many buildpacks and googled so many SO articles, but I just cannot deploy my NodeJS app. All buildpacks are out-of-date for 2+ years and none of them work.

So far I tried the following buildpacks:

https://github.com/zachlatta/heroku-buildpack-nodejs-with-opencv
https://github.com/janosujvari/heroku-buildpack-nodejs-opencv
https://elements.heroku.com/buildpacks/hdachev/heroku-buildpack-opencv
https://elements.heroku.com/buildpacks/computationaltextiles/buildpack-opencv
https://bitbucket.org/labgoo/heroku-buildpack-nodejs-with-opencv/

and maybe some more...

I wonder are there any other ways to simply install OpenCV at Heroku when deploying my NodeJS app?

igorpavlov
  • 3,576
  • 6
  • 29
  • 56

2 Answers2

2

I ran into the exact same issue -- here's what worked for me:

If your stack is heroku-16, these are the Heroku buildpacks you want to add (in this particular order!):

Heroku buildpacks

ksy
  • 182
  • 1
  • 17
0

So, it is very well known that once you give up and post a question to SO, the solution eventually comes up!

# NodeJS buildpack

$ heroku buildpacks:add heroku/nodejs

# OpenCV builbpack

$ heroku buildpacks:add --index 1 https://github.com/automata/heroku-buildpack-opencv.git

# Downgrade to Cedar 14
# since on Cedar 16 it won't work without extra configurations

$ heroku stack:set cedar-14

# Push to Heroku

$ git push heroku

# After deploying your app may scale down to 0 dynos
# ... so increase dynos amount to the desired number

$ heroku ps:scale web=1

Perfect for a hobby project!

Note: if you have multiple apps, simply add --app YOUR-APP-NAME to the end of each command.

igorpavlov
  • 3,576
  • 6
  • 29
  • 56