Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

create-vinext-app generates `packageManager` without a pnpm version on windows, causing corepack to fail

Open Beginner friendly
#3,322 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@NriotHrreion is already working on this.

Since Sep 18, 2026.

  • #3323 by @NriotHrreion — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
cli, tooling

Research direction

Start in packages/create-vinext-app/src/index.ts by reading getPackageManagerVersion() and writePackageJson(), then reproduce the Windows Corepack scenario described in the issue. Verify that generated package.json includes a detected pnpm version and that project creation completes when version detection fails or succeeds.

Written by the indexing model from the issue text.

Description

Description

Creating a project with create-vinext-app on Windows using pnpm and the default options, including the Cloudflare deployment target, fails during dependency installation:

No version specified for pnpm in "packageManager" of package.json
Command failed with exit code 1: pnpm add vinext react-server-dom-webpack @vinext/cloudflare

The scaffolder generates:

{
  "packageManager": "pnpm"
}

Corepack requires a version in this field, such as [email protected], and rejects the generated value before dependency installation can proceed.

Reproduction

On Windows with a Corepack-managed pnpm installation:

  1. Verify that pnpm --version works in the starting directory.

  2. Run:

    pnpm create vinext-app
    
  3. Accept the default options, including Cloudflare.

  4. Observe the installation failure.

  5. Inspect the generated package.json: packageManager contains pnpm without a version.

Expected behavior

Project creation should complete successfully.

The generated packageManager field should include the detected pnpm version. If version detection fails, the scaffolder should handle that failure without writing a value that Corepack rejects.

Suspected cause

In packages/create-vinext-app/src/index.ts, getPackageManagerVersion() invokes:

spawnSync(packageManager, ["--version"], {
  encoding: "utf-8",
  stdio: ["ignore", "pipe", "ignore"],
});

In the Windows installation used for local reproduction, pnpm is exposed through a Corepack pnpm.cmd launcher. Calling spawnSync("pnpm", ["--version"]) directly fails with ENOENT, returning status: null.

Consequently, version detection returns null. writePackageJson() then falls back to the package manager name:

https://github.com/cloudflare/vinext/blob/e97de291c805653f46fdd43a3840920a4611a8e1/packages/create-vinext-app/src/index.ts#L409-L415

packageManager: version ? `${packageManager}@${version}` : packageManager,

This writes "packageManager": "pnpm", which causes the subsequent Corepack invocation to fail.

Dominant language
TypeScript
Stars
9.2k
Forks
441
Avg merge
1d 2h
Merged PRs (30d)
437

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/vinext

All issues in cloudflare/vinext

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.