Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,13 @@ jobs:
access_token: ${{ github.token }}
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
- name: Set node version
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: '20'
- name: Cache node_modules
id: node-modules-cache
uses: actions/cache@v4
with:
path: '**/node_modules'
key: node-modules-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Enable pnpm
run: corepack enable pnpm
- name: Install dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: pnpm install
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/.next
**/next-env.d.ts
**/node_modules
**/package-lock.json
**/pnpm-lock.yaml
1 change: 1 addition & 0 deletions basics/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace=true
1 change: 1 addition & 0 deletions basics/learn-starter/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace=true
5 changes: 5 additions & 0 deletions basics/learn-starter/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
packages:
- .
minimumReleaseAge: 2880
onlyBuiltDependencies:
- sharp
1 change: 1 addition & 0 deletions dashboard/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace=true
1 change: 1 addition & 0 deletions dashboard/final-example/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace=true
6 changes: 0 additions & 6 deletions dashboard/final-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,5 @@
"@types/node": "22.10.7",
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3"
},
Copy link
Copy Markdown
Contributor

@vercel vercel Bot May 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit c3c8c19 removed pnpm.onlyBuiltDependencies from sub-project package.json files, breaking native module builds when these projects are installed standalone (outside the workspace).

Fix on Vercel

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were moved into pnpm-workspace.yaml

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pnpm-workspace.yaml settings won't apply to these sub-projects when they're installed standalone. I verified this locally:

With --ignore-workspace (as used in seo/vercel.json and seo/demo/vercel.json):
The parent pnpm-workspace.yaml's onlyBuiltDependencies is ignored, and pnpm outputs:

Ignored build scripts: sharp@0.33.5.
Run "pnpm approve-builds" to pick which dependencies should be allowed to run scripts.

With pnpm.onlyBuiltDependencies in the sub-project's own package.json:
Sharp's install script runs correctly:

.../sharp@0.33.5/node_modules/sharp install$ node install/check
.../sharp@0.33.5/node_modules/sharp install: Done

Since --ignore-workspace causes pnpm to ignore the entire pnpm-workspace.yaml file (not just workspace package linking), the standalone sub-projects need their own pnpm.onlyBuiltDependencies in their package.json.

Comment thread
vercel[bot] marked this conversation as resolved.
"pnpm": {
"onlyBuiltDependencies": [
"bcrypt",
"sharp"
]
}
}
6 changes: 6 additions & 0 deletions dashboard/final-example/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
packages:
- .
minimumReleaseAge: 2880
onlyBuiltDependencies:
- bcrypt
- sharp
1 change: 1 addition & 0 deletions dashboard/starter-example/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-workspace=true
6 changes: 0 additions & 6 deletions dashboard/starter-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,5 @@
"@types/node": "22.10.7",
"@types/react": "19.0.7",
"@types/react-dom": "19.0.3"
},
"pnpm": {
"onlyBuiltDependencies": [
"bcrypt",
"sharp"
]
}
}
6 changes: 6 additions & 0 deletions dashboard/starter-example/pnpm-workspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
packages:
- .
minimumReleaseAge: 2880
onlyBuiltDependencies:
- bcrypt
- sharp
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"prettier": "prettier --write --ignore-unknown .",
"prettier:check": "prettier --check --ignore-unknown .",
"start": "next start",
"test": "npm run lint && npm run prettier:check"
"test": "pnpm run lint && pnpm run prettier:check"
},
"dependencies": {
"@tailwindcss/forms": "^0.5.7",
Expand All @@ -17,9 +17,10 @@
"eslint-config-next": "14.0.0",
"eslint-config-prettier": "9.0.0",
"prettier": "3.0.3",
"prettier-plugin-packagejson": "^3.0.2",
"prettier-plugin-tailwindcss": "0.5.4"
},
"packageManager": "pnpm@8.7.0",
"packageManager": "pnpm@10.33.0+sha512.10568bb4a6afb58c9eb3630da90cc9516417abebd3fabbe6739f0ae795728da1491e9db5a544c76ad8eb7570f5c4bb3d6c637b2cb41bfdcdb47fa823c8649319",
"engines": {
"node": ">=18.17.0"
}
Expand Down
Loading
Loading