a year ago
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
you did not perform an installation before running the script (e.g.
npx puppeteer browsers install chrome
) oryour 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)```
0 Replies
a year ago
you did not perform an installation before running the script (e.g. `npx puppeteer browsers install chrome`)
<@539512869780455445> railway should be running the puppeteer install command on build no?
a year ago
railway runs your code as-is, its up to you to set the needed commands
a year ago
you would likely want to set that command in a new build phase