I'm on Debian 8.7.1.
I want to use Google Chrome Puppeteer.
I have a file named script.js, and I put the getting screenshot commands as recommended in the Puppeteer documentation.
For running the JavaScript file, I run the following command:
nodejs script.js
But it has some errors:
(node:929) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
(node:929) [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.
nodejs -v
is v8.4.0
and npm -v
is 5.3.0
.
Please help me to solve this problem.
From error info:
Chromium revision is not downloaded. Run "npm install"
cd /path/to/puppeteer && npm install
this command will download chromium to /path/to/project/node_modules/puppeteer/.local-chromium/
sudo npm install -g puppeteer --unsafe-perm=true --allow-root
worked!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With