Repository navigation
Conversation
pnpm 12 ships bin/pnpm.mjs and bin/pnpx.mjs instead of .cjs files, so the generated launchers pointed at missing files. Use the .mjs script when present and fall back to .cjs otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Fixes #2114
Summary
pnpm 12 ships
bin/pnpm.mjsandbin/pnpx.mjsinstead of the.cjsentry scripts used by earlier versions (e.g. 10.x). Volta generates its ownbin/pnpm/bin/pnpxlaunchers after unpacking the archive, and those hardcoded.cjs, so running pnpm 12 failed withCannot find module '.../bin/pnpm.cjs'.The launchers now use
<tool>.mjswhen it exists in the unpackedbindirectory and fall back to<tool>.cjsotherwise. This applies to both the shell launcher and the Windows.cmdlauncher.Testing
write_launchercovering both the.mjsand.cjslayouts.cargo test -p volta-corepasses (108 tests);cargo fmt --checkandcargo clippy --all-targetsare clean.bin/pnpm.mjsandbin/pnpx.mjs.Note: pnpm versions that are already installed keep their existing launchers. Reinstalling them (after removing
~/.volta/tools/image/pnpm/<version>) regenerates the launchers.🤖 Generated with Claude Code