Skip to content

JetBrains: File Watchers

Using NVM

The nvm not working in JetBrains IDE. Need a workaround.

Configuration

Put below variable into your .bashrc, .zshrc, or other shell profile.

shell
export NVM_SYMLINK_CURRENT=true

Every time when you run nvm use, script will create symlink to the current version of node in $NVM_DIR/current.

File Watcher

Program

shell
/home/user/.nvm/current/bin/npm

Arguments

run my-script $FilePath$

In case of missing node

shell
sudo ln -s /home/user/.nvm/current/bin/node /usr/local/bin/node

Details

Environment variable COMPILE_PARTIAL=true is required to trigger File Watcher on SCSS partial files.

Sources: