Skip to content

Instantly share code, notes, and snippets.

@lgg
Last active July 5, 2023 13:41
Show Gist options
  • Save lgg/2cbdadd5253b397f6f0f6ccbedfd183f to your computer and use it in GitHub Desktop.
Save lgg/2cbdadd5253b397f6f0f6ccbedfd183f to your computer and use it in GitHub Desktop.
JetBrains intellij idea + NVM + nodejs + WebStorm

NVM + WebStorm

If you get error:

run npm command gives error "/usr/bin/env: node: No such file or directory

in file watcher

solution:

  • edit .bashrc and add export NVM_SYMLINK_CURRENT=true before NVM-stuff
  • then nvm use default
  • Then add $HOME/.nvm/current/bin to your PATH in .profile:
# NVM
if [ -d "$HOME/.nvm/current/bin" ] ; then
    PATH="$HOME/.nvm/current/bin:$PATH"
fi
  • reboot

via JetBrains forum


Solution for Ubuntu 21.04 by @chrisvoo

oriinal comment: https://gist.github.com/lgg/2cbdadd5253b397f6f0f6ccbedfd183f#gistcomment-3803134

For me worked what explained here: in particular, on Ubuntu 21.04, I edited the file ~/.local/share/applications/jetbrains-webstorm.desktop, modifying the Exec item with Exec=/bin/bash -i -c "/home/christian/.local/share/JetBrains/Toolbox/apps/WebStorm/ch-0/211.7442.26/bin/webstorm.sh" %f

@davedew
Copy link

davedew commented Feb 4, 2022

Thanks a lot!

@AlexiGallegos
Copy link

AlexiGallegos commented Jul 5, 2023

worked for me on phpstorm. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment