Skip to content

docs: clarify Node.js v22.13.0 minimum and note Alpine Docker gotcha#262

Open
Alike001 wants to merge 1 commit into
NomicFoundation:mainfrom
Alike001:docs/node-22-13-prereq
Open

docs: clarify Node.js v22.13.0 minimum and note Alpine Docker gotcha#262
Alike001 wants to merge 1 commit into
NomicFoundation:mainfrom
Alike001:docs/node-22-13-prereq

Conversation

@Alike001
Copy link
Copy Markdown

Summary

Updates the Hardhat 3 Getting Started page to match the Node.js version that the CLI actually enforces, and adds a short note for Docker users.

Why

The current docs say:

Node.js v22 or later

But the Hardhat 3 CLI enforces a stricter minimum in source:

// packages/hardhat/src/internal/cli/node-version.ts
export const MIN_SUPPORTED_NODE_VERSION: number[] = [22, 13, 0];

A user following the docs literally — for example by pulling node:22-alpine or installing Node 22.10.x — falls inside the documented range but hits a runtime error from the version check. The Alpine case is especially common because the plain node:22-alpine tag is not guaranteed to ship the latest patch version.

Issue: NomicFoundation/hardhat#8293

Change

src/content/docs/docs/getting-started.mdx:

  • Tighten the Node version from v22 or later to v22.13.0 or later.
  • Add a sub-bullet recommending Docker users pin a specific patch tag (e.g. node:22.13-alpine).

Notes

Trivial markdown change — no local build run. Indentation matches the existing nested-bullet style elsewhere in the docs. Happy to amend the wording or move the Docker note into a :::tip callout if maintainers prefer.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

@Alike001 is attempting to deploy a commit to the Nomic Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hardhat-website Ready Ready Preview, Comment May 13, 2026 11:42am

Request Review

@alcuadrado
Copy link
Copy Markdown
Member

Hey, I'll review this properly tomorrow, but out of curiosity, why do you use node 22 if you are using it with docker?

@Alike001
Copy link
Copy Markdown
Author

Hey @alcuadrado The reason was just that the Hardhat 3 docs say "Node.js v22 or later", so when I dockerized my hardhat-greeter project I picked node:22-alpine as the smallest matching tag. My original Dockerfile used node:20-alpine and Hardhat refused to start, so I bumped it to 22 to follow the docs. I didn't know about the v22.13.0 minimum until after the version check failed that's what made me realize the docs and the code didn't line up. That experience is what motivated the PR.

@alcuadrado
Copy link
Copy Markdown
Member

Thanks for sharing, @Alike001! I just wanted to know if there was some limitation that prevent you from upgrading. I'll get back to this PR today

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.

2 participants