[GH-ISSUE #169] bug: Vinext init ignores existing package manager and defaults to npm #39

Closed
opened 2026-05-06 12:36:44 +02:00 by BreizhHardware · 2 comments

Originally created by @Zaid-maker on GitHub (Feb 27, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/169

When migrating an existing Next.js project to Vinext using vinext init, the CLI does not auto-detect the package manager being used in the project.

For example, I use Bun for better performance, and I run vinext init inside a Bun-based project. However, after the compatibility check, Vinext installs dependencies using npm under the hood instead of the project’s existing package manager.

This causes significantly slower dependency installation and breaks the expected workflow. Vinext should automatically detect the package manager based on:

  • The lockfile present (bun.lockb, pnpm-lock.yaml, yarn.lock, package-lock.json)
  • Or the runtime used to execute the command (e.g., bunx vinext init)
  • Or the packageManager field in package.json

Expected behavior:
Vinext should respect and use the project's existing package manager (e.g., Bun) instead of defaulting to npm.

Originally created by @Zaid-maker on GitHub (Feb 27, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/169 When migrating an existing Next.js project to Vinext using `vinext init`, the CLI does not auto-detect the package manager being used in the project. For example, I use **Bun** for better performance, and I run `vinext init` inside a Bun-based project. However, after the compatibility check, Vinext installs dependencies using **npm** under the hood instead of the project’s existing package manager. This causes significantly slower dependency installation and breaks the expected workflow. Vinext should automatically detect the package manager based on: * The lockfile present (`bun.lockb`, `pnpm-lock.yaml`, `yarn.lock`, `package-lock.json`) * Or the runtime used to execute the command (e.g., `bunx vinext init`) * Or the `packageManager` field in `package.json` **Expected behavior:** Vinext should respect and use the project's existing package manager (e.g., Bun) instead of defaulting to npm.
Author
Owner

@threepointone commented on GitHub (Feb 27, 2026):

this is fixed in main, should go out in the next release, thanks for flagging

<!-- gh-comment-id:3975519734 --> @threepointone commented on GitHub (Feb 27, 2026): this is fixed in main, should go out in the next release, thanks for flagging
Author
Owner

@Zaid-maker commented on GitHub (Feb 28, 2026):

this is fixed in main, should go out in the next release, thanks for flagging

Thank you so much!

<!-- gh-comment-id:3976672624 --> @Zaid-maker commented on GitHub (Feb 28, 2026): > this is fixed in main, should go out in the next release, thanks for flagging Thank you so much!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#39
No description provided.