Skip to content

Fix pnpm dev commands on pnpm 9 - #157

Closed
mre wants to merge 1 commit into
masterfrom
fix-pnpm-9-compat
Closed

Fix pnpm dev commands on pnpm 9#157
mre wants to merge 1 commit into
masterfrom
fix-pnpm-9-compat

Conversation

@mre

@mre mre commented Jun 7, 2026

Copy link
Copy Markdown
Member

The pnpm-workspace.yaml added in #153 breaks pnpm 9: pnpm 9 treats the file as a workspace root and requires a packages field, so every pnpm command (including make watch) fails with ERROR packages field missing or empty.

Move the esbuild/sharp build-script approval to package.json's pnpm.onlyBuiltDependencies (honored by both pnpm 9 and 10) and remove the workspace file.

PR #153 added a pnpm-workspace.yaml to approve esbuild/sharp build scripts, but pnpm 9 treats that file as a workspace root and requires a 'packages' field, breaking every pnpm command (e.g. 'make watch'). Move the build-script approval to package.json's pnpm.onlyBuiltDependencies, which both pnpm 9 and 10 honor, and remove the workspace file.
@mre mre mentioned this pull request Jun 7, 2026
@mre

mre commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #158. This approach is incorrect: onlyBuiltDependencies was removed in pnpm 11, which is what CI runs via pnpm@latest, so this would make the deploy build fail with ERR_PNPM_IGNORED_BUILDS. The real issue is version drift between CI and local pnpm; #158 pins pnpm to 11.5.2 instead.

@mre mre closed this Jun 7, 2026
@mre
mre deleted the fix-pnpm-9-compat branch June 7, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant