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.  

0
29 comments

>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

0
Avatar
Permanently deleted user

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:

0

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?

0
Avatar
Permanently deleted user

Just the one project open. I restarted RubyMine just in case and got the same dialog

0

please provide your project .idea folder and ~/Library/Preferences/RubyMine2018.3/options/filetypes.xml file

0
Avatar
Permanently deleted user
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?

0
Avatar
Permanently deleted user

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!

0
Avatar
Permanently deleted user

Just to close the loop on this. Creating a new project did resolve the problem. Thanks again for all of the help

1

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.

0

@Jinn Is your project attached to other projects/have nested .idea folders in its structure? Must be https://youtrack.jetbrains.com/issue/WEB-36242

0

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?

0

as a workaround, please shut down WebStorm, open the .idea/misc.xml of your React project in some text editor and then change "languageLevel" to JSX:

<option name="languageLevel" value="JSX" />

This should help

0

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>

0

this must be a wrong .idea folder then; please repeat this for other project .idea folders as well

0

there are no other folders named .idea under the root directory.

0

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 folder

0

i 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. 

0

you wrote:

>My project is part of the other project

how are they organized then?

0

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.

0

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

0

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

0

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*

 

0

what menu did you try? Also, what is a result of choosing Help > Compress Logs and show in ...?

0

The "help - compress logs" menu. The result is described in my previous comment.

0

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

0

found it, thanks. please find it here:

https://pastebin.com/ed72QizJ

0

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?

0

Please sign in to leave a comment.