Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open components with webstorm: spawn webstorm ENOENT. #9

Open
bokub opened this issue Jul 12, 2018 · 5 comments
Open

Cannot open components with webstorm: spawn webstorm ENOENT. #9

bokub opened this issue Jul 12, 2018 · 5 comments

Comments

@bokub
Copy link

bokub commented Jul 12, 2018

I'm using launch-editor with webpack.

When I try to open a component in Webstorm, the following message is displayed in the dev-server console:

Could not open App.vue in the editor.
The editor process exited with an error: spawn webstorm ENOENT.

The browser console says File src/vue/App.vue opened in editor, and it works well with other editors so I guess it's well configured.

Any idea how to fix this ?
Thanks

@Amorites
Copy link

Amorites commented Sep 4, 2018

solved by #4 (comment)

@bokub
Copy link
Author

bokub commented Sep 4, 2018

Helps a little bit but it still doesn't work completely

After doing what's suggested in #4 , I can run webstorm myFile.vue, and it works great.

However, using your plugin, the file is opened with vim in the 'Terminal' tab of WebStorm, it's very strange...
image

@jdf221
Copy link

jdf221 commented Jul 5, 2021

3 years late here but for anyone who may come across this from Google trying to fix that vim issue.

If you set the env variable EDITOR="webstorm" it will open as expected. On Mac I've added this to my .zshrc:

# Adds support for various open in editor features in tools
export EDITOR="webstorm"
if [[ "$__CFBundleIdentifier" == com.jetbrains.* ]]
then
  # Removes "com.jetbrains." from the beginning of string
  # Then removes "-EAP" from end of string if needed
  export EDITOR="${${__CFBundleIdentifier#"com.jetbrains."}%"-EAP"}"
fi

Should detect which JetBrains tool you're using and set it accordingly. (Defaulting to webstorm)

If you only need Webstorm support you can add the env variable in the Terminal preferences inside Webstorm.

Note: You may need to setup the shell script command launcher for the relevant program. I use JetBrains Toolbox so they're generated automatically in my path. https://www.jetbrains.com/help/webstorm/working-with-the-ide-features-from-command-line.html

@icacho
Copy link

icacho commented Oct 25, 2021

3 years late here but for anyone who may come across this from Google trying to fix that vim issue.

If you set the env variable EDITOR="webstorm" it will open as expected. On Mac I've added this to my .zshrc:

# Adds support for various open in editor features in tools
export EDITOR="webstorm"
if [[ "$__CFBundleIdentifier" == com.jetbrains.* ]]
then
  # Removes "com.jetbrains." from the beginning of string
  # Then removes "-EAP" from end of string if needed
  export EDITOR="${${__CFBundleIdentifier#"com.jetbrains."}%"-EAP"}"
fi

Should detect which JetBrains tool you're using and set it accordingly. (Defaulting to webstorm)

If you only need Webstorm support you can add the env variable in the Terminal preferences inside Webstorm.

@jdf221 I'd tip my hat to you sir, I've been fighting this issue since day-1 with macOS+Webstorm, your solution works like a charm (tested using Webstorm 2021.2 | error msg before: Error: spawn docker ENOENT)

@vjpr
Copy link

vjpr commented Apr 17, 2024

Issue is that Jetbrains toolbox seems to use shell scripts shims/wrappers that run the binary.

launch-editor expects a binary.

launch-editor should handle shell scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants