I am currently working on project where I need to build an application that needs to open an URL in a browser in order to use some functions on it.
for that I used puppe
You need to include the Puppeteer Heroku buildpack to the list of buildpacks for your app. Go to your Heroku dashboard and open your app. Go to Settings > Buildpacks > Add buildpack and use this URL.
https://github.com/jontewks/puppeteer-heroku-buildpack
When you click add buildpack, simply paste that URL into the input, and click save. On the next deploy, your app will also install the dependencies that Puppeteer needs to run.
See the troubleshooting guide for more help.
Here is what worked for me. First, I clear all my buildpacks and then I added the puppeteer-heroku-buildpack and the heroku/nodejs one:
$ heroku buildpacks:clear
$ heroku buildpacks:add --index 1 https://github.com/jontewks/puppeteer-heroku-buildpack
$ heroku buildpacks:add --index 1 heroku/nodejs