Specify npm 11.* in engines to suppress version upgrade notices#404
Open
schneems wants to merge 1 commit into
Open
Specify npm 11.* in engines to suppress version upgrade notices#404schneems wants to merge 1 commit into
schneems wants to merge 1 commit into
Conversation
Without an explicit npm version in engines, Heroku uses a default that lags behind the latest release. This causes npm to print "New minor version of npm available!" notices during every build, cluttering the getting started tutorial output.
schneems
commented
Jun 1, 2026
| "engines": { | ||
| "node": "20.x || 22.x || 24.x" | ||
| "node": "20.x || 22.x || 24.x", | ||
| "npm": "11.*" |
Contributor
Author
There was a problem hiding this comment.
❯ /pr-review-toolkit:review-pr https://github.com/heroku/nodejs-getting-started/pull/404
Critical Issues (0 found)
None.
Important Issues (0 found)
None.
Suggestions (1)
- Version range specificity: "npm": "11.*" pins to npm 11.x. When a future Node major (e.g., 26.x) ships with npm 12+, this constraint will force the
buildpack to downgrade npm. This is fine for a getting-started template (it'll get updated), but worth noting in a comment or the PR description that this
will need a bump alongside any future Node major addition. (Already implicitly addressed by the PR description's context.)
Strengths
- Well-motivated: The PR body clearly explains the problem (5 noisy upgrade notices per tutorial build) and the mechanism (buildpack resolves + installs
latest 11.x).
- Minimal change: Only touches what's needed — no scope creep.
- Correct JSON syntax: Trailing comma properly added to the preceding line.
- Compatible range: npm 11 supports Node >= 20, which aligns with all listed engine versions (20.x, 22.x, 24.x).
Recommended Action
Ship it. This is a clean, low-risk fix that improves the developer experience for anyone following the getting-started tutorial.
colincasey
approved these changes
Jun 2, 2026
| "engines": { | ||
| "node": "20.x || 22.x || 24.x" | ||
| "node": "20.x || 22.x || 24.x", | ||
| "npm": "11.*" |
Contributor
There was a problem hiding this comment.
To be more consistent with how we tend to document and use a major version range specifier:
Suggested change
| "npm": "11.*" | |
| "npm": "11.x" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Node 24.16.0 bundles npm 11.13.0 but npm 11.16.0 has since been released. Since the buildpack uses whatever npm ships with the Node binary (there's no buildpack-level default to update), npm prints upgrade notices on every invocation during the build:
This block appears 5 times in the generated getting started tutorial (twice per deploy during install + prune, across 2 deploys + the db provision step).
Adding
"npm": "11.*"to engines tells the buildpack to resolve and install the latest 11.x, which eliminates the notices.