polponlineHOBBY
7 months ago
Hi, i'm getting this error when launching the puppeteer chrome
I saw this thread about it and added the nixpacks version in nixpacks.toml but no luck.
Here's my nixpacks.toml
# see https://discord.com/channels/713503345364697088/1156732499515428956
[build]
nixpacksVersion = "1.15.0"
[phases.setup]
nixPkgs = ['...', 'nodePackages_latest.ts-node']
[variables]
NIXPACKS_NODE_VERSION = '20'
[phases.install]
cmds = ['pnpm install --frozen-lockfile', 'cd client && pnpm install --frozen-lockfile']
[phases.build]
cmds = ['cd client && pnpm run build-bypass-errors']
[start]
cmd = 'ts-node --project tsconfig.json --swc index.ts'
0 Replies
Alright I added nixLibs = []
to [phases.setup]
Now I have another problem upon building the image without doing sudo docker system prune -a -f
before
Error: Could not find expected browser (chrome) locally. Run `npm install` to download the correct Chromium revision (1045629).
at ChromeLauncher.launch (/app/node_modules/.pnpm/puppeteer-core@18.2.1/node_modules/puppeteer-core/src/node/ChromeLauncher.ts:127:15)
at PuppeteerNode.launch (/app/node_modules/.pnpm/puppeteer-core@18.2.1/node_modules/puppeteer-core/src/node/PuppeteerNode.ts:170:27)
at Client.initialize (/app/node_modules/.pnpm/whatsapp-web.js@1.26.0/node_modules/whatsapp-web.js/src/Client.js:305:39)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
Also, puppetteer complains because it tries to spawn chrome as root, that isn't supported without --no-sandbox
Alrghts fixed this first issue by just adding 'node node_modules/puppeteer/install.js'
as a separate cmd in the install phase