elestio / ws-screenshot

A simple way to take a screenshot of a website by providing its URL. ws-screenshot include a simple web UI but also a REST API and a Websocket API to automate screenshots.
http://backup15.terasp.net/
MIT License
106 stars 36 forks source link

puppeteer #3

Closed ZarinNegah closed 2 years ago

ZarinNegah commented 3 years ago

hi good time I tried to run with nodejs as well And I went through all the announced steps But I get the following error

Cannot find module 'puppeteer' Require stack:

jbenguira commented 3 years ago

Can you confirm you did this?

git clone git@github.com:elestio/ws-screenshot.git
cd ws-screenshot
npm install

and also this: ./installPuppeteerNativeDeps.sh

If yes and if you still have the issue please try this in the ws-screenshot folder: npm install puppeteer

ZarinNegah commented 3 years ago

Can you confirm you did this?

git clone git@github.com:elestio/ws-screenshot.git
cd ws-screenshot
npm install

and also this: ./installPuppeteerNativeDeps.sh

If yes and if you still have the issue please try this in the ws-screenshot folder: npm install puppeteer

I did all the steps But the last step gives an error npm install puppeteer The following error

root@screen:~# npm install puppeteer

puppeteer@5.3.1 install /root/node_modules/puppeteer node install.js

ERROR: Failed to set up Chromium r800071! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download. Error: Download failed: server returned code 403. URL: https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/800071/chrome-linux.zip at /root/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:359:27 at ClientRequest.requestCallback (/root/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserFetcher.js:485:13) at Object.onceWrapper (events.js:422:26) at ClientRequest.emit (events.js:315:20) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:596:27) at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17) at TLSSocket.socketOnData (_http_client.js:469:22) at TLSSocket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12) at readableAddChunk (_stream_readable.js:271:9) npm WARN enoent ENOENT: no such file or directory, open '/root/package.json' npm WARN root No description npm WARN root No repository field. npm WARN root No README data npm WARN root No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! puppeteer@5.3.1 install: node install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer@5.3.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-09-27T13_48_30_627Z-debug.log

jbenguira commented 3 years ago

That download is working on my side (https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/800071/chrome-linux.zip)

If it's blocked on your network, there is nothing much you can do except changing network, using a proxy ... Or using the precompiled docker image ;)

ZarinNegah commented 3 years ago

That download is working on my side (https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/800071/chrome-linux.zip)

If it's blocked on your network, there is nothing much you can do except changing network, using a proxy ... Or using the precompiled docker image ;)

thanks