Apify and Crawlee Official Forum

Updated 2 years ago

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:
Plain Text
[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..
s
O
2 comments
would love some assistance
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 ?
Add a reply
Sign up and join the conversation on Discord