question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When I pkg my file and include puppeteer in my dependencies I get an error when I run my application.

See original GitHub issue

I am using just regular puppeteer not puppeteer-core. How do I properly add puppeteer to my pack.json dependencies so I wont get this error when running it in my terminal?

(node:36178) UnhandledPromiseRejectionWarning: Error: Could not find browser revision 800071. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
    at ChromeLauncher.launch (/Users/ethan/node_modules/puppeteer-core/lib/cjs/puppeteer/node/Launcher.js:86:23)
    at async getArtist (/Users/ethan/Documents/html-js/SoundCloud-Terminal/searchArtist.js:13:21)
    at async /Users/ethan/Documents/html-js/SoundCloud-Terminal/searchArtist.js:57:23
(node:36178) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:36178) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:16
  • Comments:17

github_iconTop GitHub Comments

1reaction
govzacommented, Oct 20, 2020

Using example of github action here https://github.com/marketplace/actions/puppeteer-headful

was able to run in docker container providing

browser = await puppeteer.launch({
  executablePath: process.env.PUPPETEER_EXEC_PATH, // set by docker container
  headless: false,
  ...
});

Dockerfile entrypoint.sh: export PUPPETEER_EXEC_PATH=“google-chrome-stable”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting
Make sure all the necessary dependencies are installed. You can run ldd chrome | grep not on a Linux machine to check which...
Read more >
How do I install the required dependencies needed for ...
Problem: My app is deployed to Fly.io . I use puppeteer to grab search results from a few different websites. It works fine...
Read more >
How to use Puppeteer inside a Docker container
The browser installation via apt will resolve the required dependencies to run a headless browser inside a Docker container without any manual ...
Read more >
SOLVED - NPM Installation Errors
I am trying to install NPM for a Node.js application. I have already registered the app using Application Manager and uploaded my ......
Read more >
How To Write End-to-End Tests in Node.js Using ...
Note that your individual path to the chrome module may vary. With the required dependencies installed, your package.json file will have them ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found