Create-react-app: Overlay launch editor in Webstorm 2017.3.2 does not work

Created on 30 Dec 2017  路  4Comments  路  Source: facebook/create-react-app

Is this a bug report?

Yes.
The launch editor functionality does not work for Webstorm 2017.3.2.
As per Webstorm docs, the command should specify the workspace too.

After some debugging, I saw the https://github.com/facebookincubator/create-react-app/blob/4434467a438c3d431a5169038a5f481bbf763efe/packages/react-dev-utils/launchEditor.js#L130 initialization, and I don't see anywhere where the variable is reinitialized.

Can you also reproduce the problem with npm 4.x?

Yes. Current version I'm using is 4.2.0

Which terms did you search for in User Guide?

The only relevant description can be found in the Advanced Configuration, therefore theREACT_EDITOR - which I didn't override.

Environment

  1. node -v:
    v7.10.1
  2. npm -v:
    4.2.0
  3. yarn --version (if you use Yarn):
    1.3.2
  4. npm ls react-scripts (if you haven鈥檛 ejected):

Then, specify:

  1. Operating system: macOS 10.13.2
  2. Browser and version (if relevant) Not relevant:

Steps to Reproduce

  1. Start the app
  2. Throw an exception anywhere in code
  3. Click on the overlay from the browser

Expected Behavior

Relevant file is opened in Webstorm.

Actual Behavior

screen shot 2017-12-30 at 19 04 40

Many thanks!

Most helpful comment

If the command with relative path doesn't work, I think there is a problem in your setup.

Are you always using the full path to the webstorm application without creating Command Line Launcher? Then probably that's the issue. If webstorm command doesn't work, then you need to manually create the launcher in WebStorm: Tools -> Create Command Line Launcher...

All 4 comments

I couldn't reproduce this behavior with Webstorm 2017.3.2. Also, it seems Webstorm does work without specifying workplace as far as path2 is absolute or relative to current working directory. In your case, the problem is somehow it has failed to figure out the current working directory correctly. Can you please try the following command and let us know how it works?

webstorm --line <some-line-number> <path-to-a-file-relative-to-current-working-directory>

@tharakawj thanks for having a look.

If I use the relative path /Applications/WebStorm.app/Contents/MacOS/webstorm --line 3 ./src/App.js, I have the same error, as described above.

Indeed, if I use the absolute path of the file, it works.
One more detail, I am using the zsh as my default shell.

If the command with relative path doesn't work, I think there is a problem in your setup.

Are you always using the full path to the webstorm application without creating Command Line Launcher? Then probably that's the issue. If webstorm command doesn't work, then you need to manually create the launcher in WebStorm: Tools -> Create Command Line Launcher...

@tharakawj Yes, that was it.

Many thanks!

Was this page helpful?
0 / 5 - 0 ratings