-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Click to Open Editor Feature of Error Overlay Documentation #2406
Comments
It's not blocked—the environment variable is being taken into account. It's just not available to the front end code (because there's need for it). The development server will still read it. If there are any issues with opening the process, you should see an error in your terminal after clicking. Do you see anything there? |
Thanks for the reply. On further investigation it seems that the click to open Feature is only available on some specific errors (runtime react errors) and not on build errors like I assumed at first. Is this intentional? But I still don't know how to make it work with WebStorm (on windows). It isn't detected automatically and REACT_EDITOR=wstorm also doesn't work. Maybe some documentation of this Feature would be helpful (I could try to do that if I knew how to make the Feature work). Edit: To answer your question: yes when clicking on a runtime error overlay the console prints a line that says |
It doesn't currently work for build errors although we'd like to make it work in the future. For runtime errors it should work but I haven't tested with WebStorm specifically. Again, do you see any error message in the Terminal after you click? |
Yeah sorry I just edited my answer after realising I didn't answer your question. |
Does running |
No I just naively plucked that from here: https://github.com/facebookincubator/create-react-app/pull/2141/files#diff-e891084243d9d79cbaff6e11eab1a4fdR54 I tried to use After I added the path to webstorm to the system PATH variable and just used Is there interest in documenting the neccesary configuration for this editor integration? |
I think it would make sense if it was more comprehensive (e.g. figure out what's missing for every popular editor), not just focused on WebStorm.
Perhaps you could look into its console arguments? Maybe we're passing the line in a wrong way.
You can probably fix it by wrapping path in quotes. Although the approach with PATH seems closer to how I imagined it working. |
Fixed by #2414. |
Maybe something that mentions the Feature and having to add the editor bin Folder to PATH and the executable name to the .env.local File? However I am not sure how it would work on mac/linux. |
It's worth adding a section to User Guide and linking to it from the console with a short URL (e.g. |
Reopened for docs. |
Is it possible to hack support for PhpStorm 2017 in |
Maybe! Check out this file and suggest edits: |
Fixed in 1.0.8. Please verify. |
Thank you! I have also noticed that it might create |
Can you reproduce the problem with latest npm?
yes
Description
The Feature 'click on the error overlay to open in editor' expects an environment Variable called REACT_EDITOR (https://github.com/facebookincubator/create-react-app/pull/2141/files#diff-e891084243d9d79cbaff6e11eab1a4fdR82). However the documentation states, that any environment variable not starting with REACT_APP_* will get blocked.
Expected behavior
When writing REACT_EDITOR=wstorm (etc) into a .env.local File I expect the click to open editor Feature to work.
Actual behavior
The Feature does not work. When using
console.log(process.env.REACT_EDITOR)
in the code it logsundefined
.Environment
Run these commands in the project folder and fill in their results:
npm ls react-scripts
(if you haven’t ejected): 1.0.7node -v
: 7.10.0npm -v
: 4.6.1Then, specify:
Reproducible Demo
https://github.com/wirmar/cra-error-overlay-issue
things to note in demo:
.evn.local file
console log
Other
This probably also blocks automatic detection of used Editor on windows via env vars EDITOR and VISUAL.
The text was updated successfully, but these errors were encountered: