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.

Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"

See original GitHub issue
  • Platform / OS version: Ubuntu 16.04 (aws ec2)
  • Node.js version: v8.12.0
  • NPM: 6.4.1

I have added browsershot on my laravel project. Pupperteer is required for browsershot.

Using ssh I have run this command - sudo npm install --global --unsafe-perm puppeteer

> puppeteer@1.10.0 install /usr/lib/node_modules/puppeteer
> node install.js

**INFO** Skipping Chromium download. "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" was set in npm config.
+ puppeteer@1.10.0
updated 1 package in 1.724s

and successfully installed puppeteer.

But when trying to reload the website I am getting this error

ProcessFailedException
The command "PATH=$PATH:/usr/local/bin NODE_PATH=`npm root -g` node '/home/ubuntu/websites/onlinebooksreview_production/vendor/spatie/browsershot/src/../bin/browser.js' '{"url":"file:\/\/\/home\/ubuntu\/websites\/example.com\/public\/uploads\/videos\/temp_data\/template_1\/temp_design.html","action":"screenshot","options":{"type":"png","path":"\/home\/ubuntu\/websites\/onlinebooksreview_production\/public\/uploads\/videos\/temp_data\/template_1\/image00001.png","args":[],"viewport":{"width":1280,"height":720}}}'" failed.

Exit Code: 1(General error)

Working directory: /home/ubuntu/websites/exmple_site/public

Output:
================


Error Output:
================

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ npm update check failed β”‚
β”‚ Try running with sudo or get access β”‚
β”‚ to the local update config store via β”‚
β”‚ sudo chown -R $USER:$(id -gn $USER) /var/www/.config β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Error: Chromium revision is not downloaded. Run "npm install" or "yarn install"
at Launcher.launch (/usr/lib/node_modules/puppeteer/lib/Launcher.js:115:15)
at <anonymous>

On the website how can i solve this problem?

Note: I know this is very common problem and I tried to implement all the solutions. But failed to solve.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
ThisIsRoy1commented, May 21, 2019

I solved it like this:

const browser = await puppeteer.launch({ executablePath: "./node_modules/puppeteer/.local-chromium/win64-656675/chrome-win/chrome.exe"});

note the win64-656675 in the path, if you’re on a different operating system you will need to point to the appropriate folder.

puppeteer version: 1.16.0

6reactions
gombosgcommented, Dec 4, 2018

Same issue here after upgrading to Puppeteer 1.11 with Yarn (we are not using NPM, and it’s not a global installation). Interestingly, Chromium is present in the .local-chromium directory. Issue persists after deleting node_modules and doing a yarn install. I tried manually removing and reinstalling the package, same issue.

install.js also sees the Chromium revision downloaded, so it does nothing and just exits.

Looking into the runtime exception, it is looking for a .local-chromium dir with the wrong number. E.g. Error: ENOENT: no such file or directory, stat '....../node_modules/puppeteer/.local-chromium/linux-599821' but the directory has number 609904.

Going up the stack trace, I found that class Launcher gets a bad preferredRevision value, which is read from index.js which reads from Puppeteer’s package.json. And there the number is not matching the folder’s name.

Interestingly, downgrading to 1.10 then upgrading back to 1.11 solved the issue and regenerated the right number in package.json.

It’s like chasing a ghost. Sorry for not being able to zero in on the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - Puppeteer Error: Chromium revision is not downloaded
I only managed to fix the issue by manually installing Chromium after much searching and trying most of the suggestions:
Read more >
Error: Chromium revision is not downloaded. Run ... - GitHub
I have tried the suggestions in the earlier posting regarding this problem, but it doesn't help. Chromium is installed (version 79.0.3945.130)Β ...
Read more >
A critical error: Chromium revision is not downloaded.
A critical error: Chromium revision is not downloaded. ... is not downloaded. Run "npm install" or "yarn install" at Launcher.launchΒ ...
Read more >
Chromium revision is not downloaded. Run "npm install" or ...
Error : Chromium revision is not downloaded. Run "npm install" or "yarn install" at Launcher.launchΒ ...
Read more >
How to find the right CHROMIUM_REVISION value for a given ...
But the problem is to map the application version (for example, 92.x) to the revision that can be successfully installed.
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