When I start up WebStorm and open my project I get an error that "PhoneGap Plugin: PhoneGap/Cordova has incorrect executable path" I am not sure how to resolve this error?
Please check Settings(Preferences) | Languages & Frameworks | JavaScript | PhoneGap/Cordova - what path to PhoneGap/Cordova executable is specified there?
It is blank. When I type cordova --version I get 6.4.0. But I am not sure where the command is coming from? This is a Linux system so I can do a 'which' to find out where the executable path is but the settings seem to also want a working folder? When I type the path (/home/vagrant/.nvm/v6.9.1/bin/cordova) I still get a message in the settings to correct the path.
NVM patches environment variables on terminal startup only. If the IDE is launched from Terminal, it inherits Terminal environment (including modified PATH environment variable, added NVM_DIR env var, etc). In that case, there are normally no problems launching Node apps, because WebStorm sees correct $PATH value. If you're using bash as shell, workaround could be the the following: edit your WebStorm launcher and set command to /bin/bash -l -c "/path/to/webstorm.sh. This command will perform bash login (i.e. reading your .bashrc/.bash_profile files) and after that will run webstorm.sh.
`-l -c` didn't work for me, but looking for solutions how to pass the .bashrc into an application launcher, I found that we need to use `-ic` options in bash, which worked!
/bin/bash -ic "/path/to/webstorm.sh"
FYI, I am using Gnome, so my launcher is a Gnome Desktop Entry:
Please check Settings(Preferences) | Languages & Frameworks | JavaScript | PhoneGap/Cordova - what path to PhoneGap/Cordova executable is specified there?
It is blank. When I type cordova --version I get 6.4.0. But I am not sure where the command is coming from? This is a Linux system so I can do a 'which' to find out where the executable path is but the settings seem to also want a working folder? When I type the path (/home/vagrant/.nvm/v6.9.1/bin/cordova) I still get a message in the settings to correct the path.
setting the executable to the path returned by `which cordova` should work; can you attach your idea.log?
Same issue.
might be a $PATH issue. Can you check if the problem persist when running WebStorm from terminal?
Good guess, it works when running from the terminal:
NVM patches environment variables on terminal startup only. If the IDE is launched from Terminal, it inherits Terminal environment (including modified PATH environment variable, added NVM_DIR env var, etc). In that case, there are normally no problems launching Node apps, because WebStorm sees correct $PATH value.
If you're using bash as shell, workaround could be the the following: edit your WebStorm launcher and set command to
/bin/bash -l -c "/path/to/webstorm.sh
. This command will perform bash login (i.e. reading your .bashrc/.bash_profile files) and after that will run webstorm.sh.`-l -c` didn't work for me, but looking for solutions how to pass the .bashrc into an application launcher, I found that we need to use `-ic` options in bash, which worked!
FYI, I am using Gnome, so my launcher is a Gnome Desktop Entry: