feat(node): include corepack shims in runtime image for Node 25+#568
Merged
Conversation
- Introduce a new example project demonstrating Node.js 25+ integration with Corepack and pnpm. - Includes a test specification to verify runtime version and execution flow. Generated-by: aiautocommit
- Explain the shift in corepack availability and requirement in Node 25+. - Detail the directory structure for shims and the impact on the build process. - Update maintenance documentation to include pnpm lockfile version mapping. Generated-by: aiautocommit
* Include /mise/installs and /mise/shims in buildIncludeDirs when using corepack. * This ensures that binaries like pnpm are correctly captured in the final image despite runtime mutations performed by corepack. Generated-by: aiautocommit
Generated-by: aiautocommit
- Include `/mise/installs` and `/mise/shims` in the build plan snapshots to support mise-managed toolchains. - Update pnpm-corepack-runtime snapshot to reflect current install and build command logic. Generated-by: aiautocommit
Generated-by: aiautocommit
- Rename node-pnpm-corepack-runtime to pnpm-corepack-runtime-usage to better reflect its purpose. - Update node engine version to v26 in example configuration. - Update test expectation to match the new node version. Generated-by: aiautocommit
Generated-by: aiautocommit
4cb9467 to
720cdd3
Compare
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.
Motivation
Node.js 25+ no longer ships Corepack. Railpack installs and activates it during the build, but
corepack preparemutates the mise-managed Node install (global packages and shims). Those paths were not copied into the runtime image, sopnpm run startfailed withpnpm: command not found.Fixes #563
Description
When Corepack is used, the Node provider now adds
/mise/installsand/mise/shimstobuildIncludeDirsalongside the existing/opt/corepackinclude. That captures the package-manager binaries and symlinks created after the initial mise install step, so they are present in the final runtime layer without a separate Corepack install at deploy time.Documentation in the developing-locally guide covers Node 25 Corepack behavior, shim layout, and why those directories must be included from the build step.
Test
examples/node-pnpm-corepack-runtime: Node 25,packageManager: pnpm, Corepack during build,pnpm run startat runtime.