Switch CodeSandbox repros to pnpm #63038
Merged
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.
Closes #57895
Closes #57896
What?
Switch Yarn v1 to pnpm for reproduction repos, avoiding the CodeSandbox Yarn v1
yarn.lock
caching problem described belowWhy?
As confirmed with @CompuIves, CodeSandbox caches the
yarn.lock
file generated after the first start +yarn install
of a GitHub template (Yarn v1) - this saves old versions of Next.js (not the latest canary) in the lockfile and causes old versions of Next.js to be installed when users click on the CodeSandbox Reproduction link during issue creation.This leads to the current breakage, where Next.js actually cannot even start in the reproduction sandbox:
vercel/next
GitHub repodev
task started below (experimental.appDir: true
was required in the13.0.8-canary.0
version of Next.js in the cachedyarn.lock
file, but thenext.config.js
file no longer includes this config)Sandbox demo: https://codesandbox.io/p/sandbox/quirky-pascal-n32xk2?file=%2Fnext.config.js%3A5%2C1
How?
Switch to pnpm installation commands instead of Yarn v1
Caveats
This uses CodeSandbox-specific config
Alternatives considered
yarn.lock
file to block caching of this file, PR open here: Add empty yarn.lock to prevent caching #57896cc @samcx @CompuIves