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.
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!):
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.