Search code examples
pnpm

Why pnpm has two stores when using with nvm?


I did found pnpm is using two stores when installed in nvm environment.

/Users/me/.pnpm-global/1
/Users/me/.nvm/versions/node/v10.15.3/pnpm-global/1

Trying to understand, why it is so.


Solution

  • ~/.pnpm-global is not the store. It is the location where the global packages are installed. For instance, when you run pnpm i -g webpack-cli, webpack will be installed into ~/.pnpm-global.

    It is probably some bug that you have two of those. There should be one global folder, probably this one only: /Users/me/.nvm/versions/node/v10.15.3/pnpm-global/1

    The global store is located at ~/.pnpm-store