I have a strange issue with copying around node projects while using pnpm.
When I copy the folder and then run pnpm install to rebuild the node_modules folder, I get the following error:
bash-4.2$ pnpm install
Lockfile is up to date, resolution step is skipped
ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
Your Node version is incompatible with "/@firstname.lastname@example.orgemail@example.com".
Expected version: ^16.14 || >=18
This is happening because the package's manifest has an engines.node field specified.
To fix this issue, install the required Node version.
The solution is to remove the pnpm-lock.yaml file.
I'm not sure why but it resolves the issue well enough for now.