Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit d57fb67

Browse files
authored
fix vercel cache issue (#695)
1 parent b78693f commit d57fb67

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.puppeteerrc.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const isCI = !!process.env.VERCEL_ENV
2+
3+
/**
4+
* @type {import("puppeteer").Configuration}
5+
*/
6+
module.exports = {
7+
cacheDirectory: '/vercel/.cache/puppeteer',
8+
executablePath:
9+
'/vercel/.cache/puppeteer/chrome/linux-131.0.6778.204/chrome-linux64/chrome',
10+
chrome: {
11+
skipDownload: isCI,
12+
},
13+
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
14+
}

puppeteer.config.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"buildCommand": "yarn build",
3-
"installCommand": "dnf install -y $(cat chrome-dependencies.txt) && npx browsers install [email protected] --path /vercel/.cache/puppeteer && yarn install",
3+
"installCommand": "dnf install -y $(cat chrome-dependencies.txt) && yarn install && npx browsers install [email protected] --path /vercel/.cache/puppeteer",
44
"framework": "nextjs"
55
}

0 commit comments

Comments
 (0)