npm is installed using nvm but IntelliJ does not know about it

It is because idea terminal launches a login shell by default, so the .bashrc file is not read.

To solve the problem:

Open "Settings" in IntelliJ. Then, expand "Tools" in the left panel, then click 'Terminal'.

Add -i to the Shell Path. (eg. /bin/bash -i)


ln -s "$(which node)" /usr/local/bin/node

The command will create a symlink from the current node version you have installed. If there is already a /usr/local/bin/node file, delete that since it might be a broken link.

Also change in Edit Configuration from whatever project version you have to "node" (which will be the link created with the above command) Edit Configurations