Just use pnpm in place of npm: pnpm add lodash Options -C <path>, --dir <path> Run as if pnpm was started in <path> instead of the current working directory.