WebStorm “Let definition are not supported by current JavaScript version” [duplicate]

I am trying to use new tools available for coding in JavaScript. I've seen the post PhpStorm "Let definition are not supported by current JavaScript version". I've tried as suggested over there, but do not work.

When I hover over the export

Export declarations are not supported by current JavaScript version

When I hover over the yield

Generators are not supported by current JavaScript version

and hovering over the let

Let definition are not supported by current JavaScript version

So the question is how to upgrade the JavaScript version?


It can be set up like in the following image:

enter image description here

Flow: File -> Settings -> Languages & Frameworks -> Javascript


Make sure you restart your IDE after changing the JS language version to ECMAScript 6.


You need to set your JavaScript version in the IDE. This can be accessed on Windows with ctrl + alt + s. You need at least ECMA Script 6 to use let.


As others suggested, setting the language version does fix this:

File -> Settings -> Languages & Frameworks -> Javascript

However, that was not enough in my case. If you're experiencing these errors in a project that is nested within another project you must apply the JS language settings to the parent project as well.

In my case, it was a client-side React app nested inside a larger Java-based web-portal (Working with IntelliJ IDEA Ultimate, which uses the same settings flow). I am adding this answer to the discussion in the hope that it can help someone in the future.