Skip to content

fix: pin @vitejs/devtools so npm 10 can install new projects - #132

Merged
AmanVarshney01 merged 1 commit into
mainfrom
fix/npm10-vitejs-devtools-crash
Oct 16, 2026
Merged

AmanVarshney01 merged 1 commit into
mainfrom
fix/npm10-vitejs-devtools-crash

Conversation

@AmanVarshney01

Copy link
Copy Markdown
Member

Why

Since @vitejs/devtools 0.8.0 (14 October), every npm project fails to install on Node 22 with its bundled npm 10:

npm error Cannot read properties of null (reading 'edgesOut')

@vitejs/devtools is an optional peer of tsdown, and 0.8.0's own optional peers point back at it, which crashes npm 10's peer resolver. npm 11 is unaffected. This is also why "Publish PR preview" fails on #130 and #131.

What changes

npm projects pin @vitejs/devtools to 0.7.6 through overrides. It's an optional peer, so it isn't installed either way.

Testing

  • Node 22.18 with npm 10.9.3: minimal and next scaffold and install; npm run build passes.
  • bun test (non-e2e): 107 pass. Typecheck, lint and format pass.

🤖 Generated with Claude Code

@vitejs/devtools 0.8.0, an optional peer of tsdown, crashes npm 10's peer
resolver with "Cannot read properties of null (reading 'edgesOut')", so
every npm project failed to install on Node 22. npm 11 is unaffected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: 7dc49d8d-0fa2-4cf6-9dea-3a294c5791bc
📥 Commits

Reviewing files that changed from the base of the PR and between d9be725 and a32bbc9.

📒 Files selected for processing: 3
  • src/constants/dependencies.ts
  • src/tasks/install.ts
  • tests/install.test.ts

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

Summary by CodeRabbit

  • Improvements
    • Generated projects using npm now include an override that pins @vitejs/devtools to version 0.7.6, while preserving existing overrides.
    • Generated projects using other package managers are unchanged.

Walkthrough

The dependency version map now pins @vitejs/devtools to 0.7.6. For npm, template manifest generation adds this pin to packageJson.overrides and preserves existing overrides. The install test checks that the override is present for npm and absent for other package managers.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to a32bb

No actionable merge risk is established: npm-generated projects receive the DevTools pin while retaining existing overrides, and the install test checks the resulting manifest.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description clearly explains the npm 10 installation failure and the @vitejs/devtools override that fixes it.
Title check Passed The title is concise and accurately identifies the primary change and its purpose: pinning @vitejs/devtools for npm 10 compatibility.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 3 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

PR preview published

  • Version: 0.14.2-pr.132.430.1
  • Tag: pr132
  • Run with Bun: bunx create-prisma@pr132
  • Run with npm: npx create-prisma@pr132
  • Run with Yarn: yarn dlx create-prisma@pr132
  • Run with pnpm: pnpm dlx create-prisma@pr132
  • Run with Deno: deno run -A --minimum-dependency-age=0 npm:create-prisma@pr132
  • Workflow run: https://github.com/prisma/create-prisma/actions/runs/38892686425

@AmanVarshney01
AmanVarshney01 merged commit 4e467ac into main Oct 16, 2026
7 checks passed
@AmanVarshney01
AmanVarshney01 deleted the fix/npm10-vitejs-devtools-crash branch October 16, 2026 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant