Repository navigation
build(pnpm): unpack packages into the shared virtual store - #204
Merged
Merged
Conversation
The sandbox always denies writing .idea and .vscode inside the working directory, and packages such as iconv-lite 0.6.3 ship them, so pnpm install failed in fresh worktrees. pnpm now uses its global virtual store under the XDG data home, which the sandbox may write, and node_modules holds only links; repeat installs also become near-instant. Closes #203 Co-Authored-By: Claude Opus 5.5 <[email protected]>
furedea
added a commit
that referenced
this pull request
Oct 18, 2026
…yaml (#223) `pnpm install` in the furedea.com lane for #221 failed with `ERR_PNPM_EPERM` on `mkdir …/node_modules/.pnpm/[email protected]/…/.idea/codeStyles`. pnpm 11 reads only auth and registry settings from rc files, so `store-dir` and `enable-global-virtual-store` in `~/.config/pnpm/rc` (#204) were silently ignored: `pnpm config get enable-global-virtual-store` and `store-dir` both print `undefined` on pnpm 11.27.0. Packages then unpacked into the project's `node_modules` again, where the agent sandbox denies the `.idea` directories some packages ship. pnpm 11 reads its own settings from `$XDG_CONFIG_HOME/pnpm/config.yaml`. ## Changes - `nix/home/default.nix`: replace `pnpm/rc` with `pnpm/config.yaml` holding `storeDir` and `enableGlobalVirtualStore: true`. - `nix/checks.nix`: `pnpm-shared-virtual-store` now checks the YAML file. ## Verification - `pnpm-shared-virtual-store` was updated first and failed (`attribute "pnpm/config.yaml" missing`). - With a scratch `XDG_CONFIG_HOME` holding the same YAML, pnpm 11.27.0 resolves `enableGlobalVirtualStore` to `true` and `storeDir` to `~/.local/share/pnpm/store`. - `nix build .#checks.aarch64-darwin.home-configuration .#checks.aarch64-darwin.host-configuration .#darwinConfigurations.mbp.system`: pass. After merge, `darwin-rebuild switch` installs the file. Refs #221 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: furedea <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The sandbox always denies writing
.ideaand.vscodeinside the working directory, and no setting exemptsnode_modules. anthropics/claude-code#33054 and #80077 were closed as not planned. Packages such as iconv-lite 0.6.3 ship an.ideadirectory, sopnpm installfailed in every fresh worktree.~/.config/pnpm/rc(home-manager):store-dir=$XDG_DATA_HOME/pnpm/storeandenable-global-virtual-store=true. pnpm unpacks packages under the store'slinks, outside the project, andnode_modulesholds only links.~/.local/share/pnpmis writable. Nothing new runs outside the sandbox.Closes #203
Verification
.idea/codeStyles;require('iconv-lite')worked;enable-global-virtual-storeit also succeeded and loaded.nix build .#checks.aarch64-darwin.home-configurationpassed. It includes a newpnpm-shared-virtual-storecheck, and the rendered rc has the two settings.tests/agents/claude/test_settings.pypassed.🤖 Generated with Claude Code