Lebron James
puppeteer install in railway container
I am trying to run a node script using bun and puppeteer but the container fails to retrieve the chrome executable
$ bun src/index.ts
283 | if (this.puppeteer.configuration.browserRevision) {
284 | throw new Error(`Tried to find the browser at the configured path (${executablePath}) for revision ${this.puppeteer.browserRevision}, but no executable was found.`);
285 | }
286 | switch (this.product) {
287 | case 'chrome':
288 | throw new Error(`Could not find Chrome (ver. ${this.puppeteer.browserRevision}). This can occur if either\n` +
^
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: /root/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at resolveExecutablePath (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:288:26)
at /app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:113:31
at computeLaunchArguments (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:72:33)
at /app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:79:33
at launch (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:77:17)
at /app/node_modules/puppeteer-extra/dist/index.cjs.js:128:30
at processTicksAndRejections (:61:76)
$ bun src/index.ts
283 | if (this.puppeteer.configuration.browserRevision) {
284 | throw new Error(`Tried to find the browser at the configured path (${executablePath}) for revision ${this.puppeteer.browserRevision}, but no executable was found.`);
285 | }
286 | switch (this.product) {
287 | case 'chrome':
288 | throw new Error(`Could not find Chrome (ver. ${this.puppeteer.browserRevision}). This can occur if either\n` +
^
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: /root/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
at resolveExecutablePath (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:288:26)
at /app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:113:31
at computeLaunchArguments (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:72:33)
at /app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:79:33
at launch (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:77:17)
at /app/node_modules/puppeteer-extra/dist/index.cjs.js:128:30
at processTicksAndRejections (:61:76)
12 replies