CA
ratty-blush

Puppeteer actor dockerfile via nixpacks?

Hello, I'm trying to build a typescript puppeteer crawler with nixpacks, I can't seem to get the puppeteer dependencies to work how they should. Build completes just fine.. Here's my nixpacks.toml file:
[phases.install]
onlyIncludeFiles = ['package.json', 'package-lock.json', 'src', 'tsconfig.json', '.env', 'servicekey.json']
cmds = ['']

[phases.build]
cmds = ['npm install --include=dev', 'npm run build']

[start]
runImage = 'apify/actor-node-puppeteer-chrome:18'
cmd = 'npm run start:prod --silent'
[phases.install]
onlyIncludeFiles = ['package.json', 'package-lock.json', 'src', 'tsconfig.json', '.env', 'servicekey.json']
cmds = ['']

[phases.build]
cmds = ['npm install --include=dev', 'npm run build']

[start]
runImage = 'apify/actor-node-puppeteer-chrome:18'
cmd = 'npm run start:prod --silent'
This is the error: Error: Could not find Chromium (rev. 1108766). This can occur if either 1. you did not perform an installation before running the script (e.g. npm install) or 2. your cache path is incorrectly configured (which is: /home/myuser/.cache/puppeteer). For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
1 Reply
ratty-blush
ratty-blushOP2y ago
Does anyone have experience getting puppeteer to work with nixpacks?

Did you find this page helpful?