mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[GH-ISSUE #186] vinext deploy silently runs npm install, downgrading dependencies in Yarn/pnpm workspaces #44
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @justinfinnn on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/186
Bug
vinext deployinternally runsnpm installduring the deploy process. In a Yarn or pnpm monorepo, this silently downgrades hoisted dependencies — in our case, React 19.2.0 was downgraded to 18.3.1 mid-deploy, causing:This is because
react-dom/server.edgeis a React 19 export that doesn't exist in React 18.Environment
Steps to reproduce
vinext deploynpm installinternallynode_modules/react-dom./server.edgenot found in react-dom exportsRoot cause
vinext deployrunsnpm installregardless of which package manager the project uses. This conflicts with Yarn/pnpm lockfiles and can silently downgrade packages.This is related to #109 (package manager detection) but specific to the
deploycommand and has a concrete breaking side effect beyond just using the wrong installer.Workaround
Run
next build+wrangler deployseparately — do not usevinext deploy:Expected behavior
vinext deployshould respect the project's package manager (detect via lockfile:yarn.lock→ yarn,pnpm-lock.yaml→ pnpm,package-lock.json→ npm). It should not runnpm installin a Yarn or pnpm project.See also: #109
@solracnyc commented on GitHub (Feb 28, 2026):
We run a pnpm workspace monorepo and had to bypass
vinext deploybecause ofworkspace:*compatibility with npm-based install behavior.Our reliable path has been:
This has been stable for us on Cloudflare Workers with vinext ~0.0.15.
+1 on package-manager detection. PR #187 improves hints, but the core deploy behavior still appears to rely on
npm install.Happy to validate a candidate fix against our pnpm workspace app if that would be helpful.