Aber wenn ich es ausführe, wird dieser Fehler zurückgegeben:
Code: Select all
Error: Could not find Chrome (ver. 119.0.6045.105). This can occur if either
1. you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`) or
2. your cache path is incorrectly configured (which is: /home/sail/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at ChromeLauncher.resolveExecutablePath (/var/www/html/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:278:27)
at ChromeLauncher.executablePath (/var/www/html/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:209:25)
at ChromeLauncher.computeLaunchArguments (/var/www/html/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:103:37)
at async ChromeLauncher.launch (/var/www/html/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:69:28)
at async callChrome (/var/www/html/vendor/spatie/browsershot/bin/browser.cjs:91:23)
{"exception":"[object] (Symfony\\Component\\Process\\Exception\\ProcessFailedException(code: 0): The command \"PATH=$PATH:/usr/local/bin:/opt/homebrew/bin NODE_PATH=`npm root -g` node '/var/www/html/vendor/spatie/browsershot/src/../bin/browser.cjs' '{\"url\":\"file:\\/\\/\\/tmp\\/2013666216-0476504001704712330\\/index.html\",\"action\":\"screenshot\",\"options\":{\"type\":\"jpeg\",\"quality\":100,\"args\":[\"--no-sandbox\"],\"viewport\":{\"width\":1200,\"height\":630},\"displayHeaderFooter\":false,\"newHeadless\":true}}'\" failed.
Wissen Sie, warum?