Async/await support Follow
I'm getting red lines for es7 features.
When I just open the webstorm, it looks fine, but if I don't use webstorm and leave it in the background for 20 minutes or so, strangely, I get those red lines.
ps. The project is already set as ECMASCRIPT 6.
ps². The syntax is being used correctly. As I said when I just open, everything looks fine.
Please sign in to leave a comment.
Please can you provide the full, self-containing code snippet that shows up the issue? Code might looks fine right on opening because indexing is not yet completed and error highlighting is off.
In this case, i'm getting errors with the first and second lines.
Works fine for me. What WebStorm build do you use? Can you attach a screenshot that shows the errors (please hover over them so that the error messages are visible)?
When just loaded
After a while in the background (same code)
what errors do you see (error messages)? what files is this code declared in (.js, .html, or?) what build do you use?
Current Version: WebStorm 2016.2.3
Build number: WS-162.1812.21
They are all js files. The error message is:
`Expecting newline or semicolon`
Weird. What do you think?
the error indicates that language version is not EcmaScript 6... Is it the only project being open? Can you recreate the issue in a new project?
Ok. Looks like it happens only in this specific project.
I'm going to try to remove its .idea folder let webstorm recreate it. What do you think?
yes, worth trying. I'd also suggest invalidating caches (File | Invalidate caches, restart) prior to removing the folder... It may help
Both solutions didn't work.
That's a tricky one. haha.
Maybe it is fine to have only this project with this weird behaviour.
strange indeed... Can you provide this project? Or, at least attach your idea.log (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files)?
Sorry, I can't provide the project but idea.log files are in this url.
Nothing interesting in the logs:( I an see lots of 'StubProcessingHelperBase - unable to get stub builder for com.jetbrains.jsonSchema.JsonSchemaFileType' errors, but they don't look related to the issue (this is a problem indexing json schemes fixed in 2016.3), plus some traces from Markdown Navigator plugin that you have already disabled...
I got it.
If this one is mysterious like this, it is fine.
I will work one more week in this project, it is no big deal.
Thanks in advance.
I have a same promblem.
Also, I tried uninstall and erase all related files and new install.
(reference: http://www.uninstallmacapp.com/webstorm-10-0-2-removal.html )
But I have a same result with state of no plugins and default settings.
I'm using mac book pro 15' El capitan 10.11.6
I tried with webstorm new project with Empty Project and the problem is the same.
1. webstorm version?
2. what file is it - .js, .jsx, .html, or?
3. await can only be used inside a function marked with async... Is your function declared properly? Please provide the full code snippet
I knew the reason. In my chain of arrow functions I misplaced async keyword.
It's my fault but I think it is hard to recognize that with error message 'Expecting newline or semicolon' at the await keyword.
It would be better it provide more specific messages or can be inferred messages.
This problem was happening to me as well, and I discovered that commenting and uncommenting the constructor function made the red lines go away. Here's my code:
Looks like indexes are broken; please try invalidating caches (File | Invalidate caches, Restart)
The reason is using await keyword outside async-function.
Error message is confusing.
There is how to reproduce:
we plan to provide a special inspection with a quick fix - see https://youtrack.jetbrains.com/issue/WEB-24228
Hello, I have same bug. IntellijIDEA 2017.1 node.js plugin installed.
Thanks it was less than ecmascript 6. Now it's Ok.
I am having this issue with Webstorm 2018.1.2.
The issue is on typescript files when the function return type is defined. If I remove the ": Promise" piece below, there is no error.
Please provide the code snippet as text;
also, would you be so kind to start a new thread when reporting a new issue? this one is already long enough and includes different reports hardly related to each other
I figured out a workaround. The error only occurs if parenthesis are around the async call. You may want to add a bug for that.
Still I need a way to recreate it; please can you provide a code snippet?
Hello, I too am getting this error.
Code Snippet inside a .js file:
the warning I get is "Local variable heldListing" is redundant for the declaration of `heldListing`
Hmm.. and what is wrong with inlining heldListing?