Skip to content

[FR] Add .nvmrc and .npmrc engine-strict so Node/pnpm versions auto-match #253

Description

@chirag127

Use case

Onboarding a new contributor: they install some Node version, some pnpm version, hit pnpm install, and hope for the best. CONTRIBUTING.md prerequisites drift from package.json (see companion bug on pnpm 8 vs pnpm 10 pin).

Proposal

Add two small files at repo root:

  1. .nvmrc with the target Node version (e.g. 20) so nvm use / fnm use / volta pick the right one automatically.
  2. .npmrc with engine-strict=true so mismatched Node/pnpm errors early instead of silently misbehaving.

Optionally add a packageManager engines field enforcement via only-allow.

Existing art

Cloudflare's own workers-sdk ships .nvmrc; Vite, Next.js, Astro all do the same.

Not a bug

Repo works today; this is DX polish, not a correctness fix.

Thanks for maintaining idosal/git-mcp!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions