[Tools] Use pnpm as a Node.js version manager
Let's say for the laptop, default node version is 20.17.0
, if you want the project to use 20.18.0
with pnpm, you can do
// use node 20.18.0
pnpm env use -g 20.18.0
or, create a .npmrc
file
use-node-version=23.0.0
When run pnpm start
, it will automatically pick up the node version, if you haven't install it yet, pnpm will help to fetch and install the node version