npm pkg set engines.node='>=20'

Category: Node.js & npm/yarn

npm pkg set engines.node='>=20'

Set the minimum Node version for a project

Adds an engines.node field that declares the project needs Node 20 or newer, which helps teammates and CI pick a compatible runtime. The engine-strict config turns this declaration into a hard install failure. Check what is already declared with npm pkg get engines.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.