PhoneGap/Cordova

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?

 

0
8 comments

Please check Settings(Preferences) | Languages & Frameworks | JavaScript | PhoneGap/Cordova - what path to PhoneGap/Cordova executable is specified there?

0

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.

0

setting the executable to the path returned by `which cordova` should work; can you attach your idea.log?

0

might be a $PATH issue. Can you check if the problem persist when running WebStorm from terminal? 

0

Good guess, it works when running from the terminal:

 



0

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.

1

`-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:

$ cat /usr/share/applications/jetbrains-webstorm.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=WebStorm
Icon=/opt/webstorm/bin/webstorm.svg
Exec=bash -ic "/opt/webstorm/bin/webstorm.sh" %f
Comment=The Drive to Develop
Categories=Development;IDE;
Terminal=false
StartupWMClass=jetbrains-webstorm

 

1

Please sign in to leave a comment.