Closed amalgame21 closed 1 year ago
This error message means that puppeteer was not able to find the chrome executable. To fix this, you have to use the option --browser-executable-path
and pass the full path to chrome.
This error message means that puppeteer was not able to find the chrome executable. To fix this, you have to use the option
--browser-executable-path
and pass the full path to chrome.
Thanks for your help!
Now this command is working perfectly fine:
single-file https://github.com/gildas-lormeau/single-file-cli --back-end=puppeteer --browser-executable-path $(which chromium)
However puppeteer-firefox like this does not work
single-file https://github.com/gildas-lormeau/single-file-cli --back-end=puppeteer-firefox --browser-executable-path $(which firefox)
with error message:
Navigation timeout of 60000 ms exceeded URL: https://github.com/gildas-lormeau/single-file-cli
Stack: TimeoutError: Navigation timeout of 60000 ms exceeded
at /home/hello/single-file-cli-master/node_modules/puppeteer-core/lib/cjs/puppeteer/common/LifecycleWatcher.js:113:111
--back-end=webdriver-gecko
and --back-end=webdriver-chromium
can download webpage, but result still like wget
.
I think this solve my problem, I may stick with puppeteer and chromium. Thanks!
Like the webpabe
https://github.com/gildas-lormeau/single-file-cli
Downloaded the page somewhat just likewget
does.To reproduce: System: Arch Linux
install single-file-cli by command:
cd to the directory, make executable by
chmod +x single-file
symlink single-file to~/.local/bin
which is in the PATHInstalled
geckodriver
bysudo pacman -S geckodriver
Run the below command in terminal, all can download, but the outcome just like
wget
single-file https://github.com/gildas-lormeau/single-file-cli --back-end=webdriver-gecko
single-file https://github.com/gildas-lormeau/single-file-cli --back-end=webdriver-chromium
And I have no idea how puppeteer work without the --back-end flag. just prompt error
Failed to launch the browser process! spawn chrome ENOENT
everytime.