Search code examples
intellij-ideapackage-managerspnpm

How to specify pnpm as the "Package manager" in IntelliJ > Prefs > Languages & Frameworks > Node.js and NPM?


I have pnpm installed on my Mac (MacBook Pro (13-inch, M1, 2020)). I verify that fact by running which pnpm and pnpm --version in Terminal.app, where both succeed.

When I click the Package manager pop-up menu, I get menu items for npm, yarn, and pnpm. But when I choose pnpm, I get an error saying "Not found".

How can I get IntelliJ to "find" my pnpm installation?

enter image description here

When I click the + icon for the list of package managers, I get a list which I can narrow to pnpm, but the item in the list has blank fields.


Solution

  • pnpm version greater than 16.14.3 changed its default location. The new location for macOS is ~/Library/pnpm.

    That is why IntelliJ cannot detect it. Here is the bug on JetBrains issue tracker:

    https://youtrack.jetbrains.com/issue/WEB-52365

    The only workaround seems to be to downgrade, as defining pnpm location manually is not working currently.