Just use pnpm in place of npm:
pnpm install lodash
npm commands that are re-implemented in pnpm:
Also, there are some commands unique to pnpm:
The rest of the commands pass through to npm.
For using the programmatic API, use pnpm's engine: supi.