Embedded JSX reporting errors
Hi:
After updating to RubyMine 2018.3.3, I'm getting the following errors in javascript files that have embedded JSX. It happens only for one project and it's localized to my machine, other developers who open this project do not get the errors (though I believe they are still on 2018.3.1). Languages and Frameworks is set to React JSX.
Please sign in to leave a comment.
>other developers who open this project do not get the errors
do they use the same .idea files as you, or only source files are shared?
Does the issue occur with all your .js files, or with some certain ones only? Please select your .js file in Project tool window, hit `Ctrl+Q` (or whatever shortcut is assigned to View | Quick Documentation main menu action) and attach a screenshot of the popup that opens.
Screenshot of Preferences | Languages & Frameworks | JavaScript page would also be helpful
Only source files are shared, .idea files are not checked into source control. It occurs with all JS files with embedded JSX in them and it's only within a JSX block.
Here's the Quick Documentation screenshot:
And here's what my Javascript Language/Frameworks settings are:
JavaScript(ECMAScript 6) shown for file indicates that for current file the javascript language level is set to ECMAScript 6, not to React JSX... Is it the only project you have opened? do you have any other projects attached to current one/opened at the same time?
Just the one project open. I restarted RubyMine just in case and got the same dialog
please provide your project .idea folder and ~/Library/Preferences/RubyMine2018.3/options/filetypes.xml file
Link to zipped .idea folder and filetypes.xml https://www.dropbox.com/sh/h9dr6pi1rnu0qb3/AACIklBrmYSdILxO4iZYxigLa?dl=0
Thanks!
no clues so far... Cant' recreate the issue using provided info.
Can you reproduce it in a new project? create a project, set javascript language level to React JSX, add a .js file - does the issue persist?
It happens just in this one project. Since the .idea folder isn't shared with other developers I can create a new RubyMine project and import the code. I'll report back if the problem still persists.
Thanks for the help!
Just to close the loop on this. Creating a new project did resolve the problem. Thanks again for all of the help
reopening..
have the same issue: project settings indicate JSX, but the code cannot be parsed.
creating a new project does not solve the issue for me.
@Jinn Is your project attached to other projects/have nested .idea folders in its structure? Must be https://youtrack.jetbrains.com/issue/WEB-36242
My project is part of the other project, and yes, it looks like #36242 is my issue as well. Any idea how can I overcome it?
as a workaround, please shut down WebStorm, open the
.idea/misc.xml
of your React project in some text editor and then change"languageLevel"
toJSX
:This should help
thanks, but this is the value already:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="JSX" />
</component>
</project>
this must be a wrong
.idea
folder then; please repeat this for other project.idea
folders as wellthere are no other folders named .idea under the root directory.
try looking for them in subfolders. also, if your project is attached to others, choose other projects folders as well. The issue only occurs when there is more that 1
.idea
folderi tried before replying, there are no other idea folders:
$ find . -name ".idea"
./.idea
there is a single project with a single folder containing React files.
you wrote:
>My project is part of the other project
how are they organized then?
sorry for being not clear.
it was a try I attempted in order to have a normal syntax highlighting, it did not work so i reverted it.
currently i have a single project (PHP) with several React files, which are set to be parsed as JSX. As you've seen above, currently all JS files in my project are set to be read as JSX, I don't care at this point - and this does not work.
Please select your .js file in Project tool window, hit `Ctrl+Q` (or whatever shortcut is assigned to View | Quick Documentation main menu action) and attach a screenshot of the popup that opens.
Screenshot of Preferences | Languages & Frameworks | JavaScript page would also be helpful
No documentation found? haven't ever seen this. Are you sure that you have focused the file in the project explorer when hitting `Ctrl+Q` ?
Please share your idea.log
totally sure, tried several times.
i am sorry, but I cannot locate the log file. Tried to follow this guide https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files but the menu item only opens /tmp folder that does not contain idea.log file or anything named idea*
what menu did you try? Also, what is a result of choosing Help > Compress Logs and show in ...?
The "help - compress logs" menu. The result is described in my previous comment.
Please make sure that the hidden files are shown in your file manager, and try searching your system for idea.log files. See also https://intellij-support.jetbrains.com/hc/en-us/articles/206544519 for information about typical log folders location
found it, thanks. please find it here:
https://pastebin.com/ed72QizJ
well... The log shows that you have at least 1 nested
.idea
folder -/home/jinn/www/mifg/ctc2/ctc/modules/issues/assets/js/issue/.idea
Also, it seems that the IDE is running low of memory. Please try increasing the memory limit (
-Xmx
in Help | Edit custom VM options), then invalidate caches (File | Invalidate caches, Invalidate and restart) - does it make things any better?