fix(stackblitz): bootstrap pnpm 10 in WebContainer start command#464
Merged
Conversation
StackBlitz WebContainers ship a pinned pnpm 8.15.6, which fails the repo's `engines.pnpm >=10.0.0` gate under `engine-strict=true` and cannot read the lockfileVersion 9.0 pnpm-lock.yaml. The "Open in StackBlitz" flow therefore died on `pnpm install` with ERR_PNPM_UNSUPPORTED_ENGINE. Prepend `npm i -g pnpm@10.33.0` (matching the `packageManager` field) to the startCommand so the WebContainer installs a compatible pnpm before install/dev. Keeps engine-strict and the Node 22 / pnpm 10 requirements intact for real dev + CI. Config-only; does not affect the publishable dist/objectstack.json. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
The Open in StackBlitz flow dies on
pnpm install:StackBlitz WebContainers ship a pinned pnpm 8.15.6, which:
engines.pnpm: ">=10.0.0"gate underengine-strict=true(.npmrc), andpnpm-lock.yaml(lockfileVersion 9.0, which needs pnpm 9+/10).Relaxing the engine check is the wrong fix — pnpm 8 still can't parse the v9 lockfile. StackBlitz genuinely needs pnpm 10. The error only flags pnpm (not Node), so the WebContainer's Node already satisfies
>=22.Fix
Prepend
npm i -g pnpm@10.33.0(matching thepackageManagerfield) to.stackblitzrc'sstartCommand, so the WebContainer installs a compatible pnpm before install/dev. Also upgrades the global pnpm, so a manualpnpm install && pnpm devin the StackBlitz terminal works too.Keeps
engine-strictand the Node 22 / pnpm 10 requirements intact for real dev + CI. Config-only — does not touch the publishabledist/objectstack.json.Verification
pnpm verifygreen locally (validate ✓, typecheck ✓, build ✓, test 17/17 ✓).Lockfile is up to date)..stackblitzrcis valid JSON.🤖 Generated with Claude Code