If you want to run PhantomJS on a NodeJS Heroku project, you may have seen the dreaded error:
Apparently, all I had to do was ensure my PhantomJS buildpack came before the NodeJS buildpack. Using the command line, run:
The --index 1
flag puts the PhantomJS buildpack in the first position. The last buildpack in the list is the one that Heroku uses to boot your app. Any other buildpacks that your app eventually rely on must go first in that list.