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:
- Created 5 years ago
- Comments:13 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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 deletingnode_modules
and doing ayarn 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 number609904
.Going up the stack trace, I found that class Launcher gets a bad
preferredRevision
value, which is read fromindex.js
which reads from Puppeteerβspackage.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.