fix: make pnpm config work in clean CI environments#151
Merged
Conversation
The Package Managers workflow's pnpm leg failed with ERR_PNPM_FETCH_404 on @learn6502/learn even though it passed locally: pnpm 10 does NOT reliably read link-workspace-packages from a project .npmrc (it's the modern pnpm-workspace.yaml that's authoritative), so in a clean environment (CI, no global config) pnpm ignored the .npmrc, didn't link the local workspaces, and tried the registry. Move all pnpm settings from .npmrc into pnpm-workspace.yaml (delete .npmrc): - linkWorkspacePackages: true — link local workspaces for the plain ^ranges. - nodeLinker: hoisted — flat layout the gjsify bundler needs. - minimumReleaseAge: 0 — disable pnpm's new-version quarantine, which otherwise blocks freshly-published @gjsify/* right after a gjsify release (the other PMs have no such gate). Verified in a clean HOME (mimicking CI): pnpm install links packages/app-gnome/node_modules/@learn6502/learn -> ../../../learn. Dropping the .npmrc also removes the cosmetic "Unknown project config" warnings npm printed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #150. The Package Managers workflow's pnpm leg failed (
ERR_PNPM_FETCH_404on@learn6502/learn) although it passed locally: pnpm 10 doesn't reliably readlink-workspace-packagesfrom a project.npmrc—pnpm-workspace.yamlis the authoritative location — so in CI's clean environment pnpm ignored the.npmrc, didn't link the local workspaces, and hit the registry.Fix: move all pnpm settings from
.npmrcintopnpm-workspace.yaml(and delete.npmrc):linkWorkspacePackages: true— link local workspaces for the plain^ranges.nodeLinker: hoisted— flat layout the gjsify bundler needs.minimumReleaseAge: 0— disable pnpm's new-version quarantine, which otherwise blocks freshly-published@gjsify/*right after a gjsify release (npm/yarn/gjsify have no such gate).Verified in a clean
HOME(mimicking CI):pnpm installlinkspackages/app-gnome/node_modules/@learn6502/learn -> ../../../learn. Dropping.npmrcalso removes the cosmetic "Unknown project config" warnings npm printed. (npm/yarn/gjsify were already green in the workflow run; this only touches the pnpm path + removes the now-unused.npmrc.)