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. I've verified that 1. puppeteer is installed via npm install and 2. the cache path has a chrome browser binary in it, so I'm not sure what the problem is..
2 Replies
stormy-gold
stormy-goldOP2y ago
@Helper would love some assistance
stormy-gold
stormy-gold2y ago
Maybe try to change pptr version in package.json (https://stackoverflow.com/questions/75992952/could-not-find-chromium-rev-1108766) Or try to change node version to 16 ?
Stack Overflow
Could not find Chromium (rev. 1108766)
azure devops build pipeline throwing error as Could not find Chromium (rev. 1108766) while running angular test command (npm test ---browser=chromeheadless). even i configured pupperteer.conf.js file

Did you find this page helpful?