Add this code to $HOME/.zshrc to automatically set the node version to match the version in package.json.
Using jq and nvm to set Node version
The nvm command allows you to switch between versions of node. Often a project will include a .nvmrc file to specify the version of node to use. Even if a project does not contain an .nvmrc file, you may be able to read the preferred node version from package.json and use that value with nvm.