I’m deploying a Node.js application to Vercel that uses the capture-website npm package (which uses Puppeteer under the hood) to generate website screenshots. Locally, everything works fine, but on Vercel, I’m getting the following error:
Error making capture-website call: Could not find Chromium (rev. ...). 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/sbx_user1051/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
My package.json
includes:
"dependencies": {
"axios": "^1.6.8",
"capture-website": "^3.1.0",
"dotenv": "^16.4.5",
"express": "^4.18.3",
"nodemailer": "^6.9.15",
"openai": "^4.38.2",
"validator": "^13.12.0"
},
"devDependencies": {
"nodemon": "^3.1.0"
}
How can I resolve this “Could not find Chromium” error on Vercel?