pnpm CLI
Differences vs npm
Unlike npm, pnpm validates all options. For example, pnpm install --target_arch x64 will
fail as --target_arch is not a valid option for pnpm install.
However, some dependencies may use the npm_config_ environment variable, which
is populated from the CLI options. In this case, you have the following options:
- explicitly set the env variable:
npm_config_target_arch=x64 pnpm install - force the unknown option with
--config.:pnpm install --config.target_arch=x64
Options
-C <path>, --dir <path>
Run as if pnpm was started in <path> instead of the current working directory.