typescript 'symbol cannot be properly resolved'
Hi,
I'm using ReSharper Ultimate 2016.2.2 and I have an issue in typescript support. I'm writing a React js application and I have this code:
import * as React from "react";
interface IComponentProps<TParams> extends ReactRouter.RouteComponentProps<TParams, {}> { }
class ComponentBase<TParams, TProps> extends React.Component<IComponentProps<TParams> & TProps, {}> { }
class Details extends ComponentBase<{ id: number }, { show: string }> {
render() {
var show = this.props.show;
var id = this.props.params.id;
return (
<div className="container"></div>
);
}
}
When I try access this.props.params.id ReSharper is complaining that "Symbol 'id' cannot be properly resolved, probably it is located in inaccessible module". Typescript compiler is doesn't complain however, and it compiles correctly. When I turn off ReSharper visual studio is also correctly showing this in IntelliSense.
Should this be raised as a bug or maybe I'm doing something wrong?
Regards,
Maciek
Please sign in to leave a comment.
I have the same issue in 2017.2.2. Resharper doesn't correct detect return type from overloaded method:
Hello everyone!
Thank you for the feedback.
Please follow correspondent issue filed here - https://youtrack.jetbrains.com/issue/RSRP-466528 to get the latest updates on it.
You are welcome to comment or vote for the issue.
Thank you.
I managed to fix the problem by:
This solution is not work for me.
this problems remains for a long time and jetbrains does not solve. I stopped using resharper with visual studio because of this annoying issue. i regret being the paid subscriber.
Sorry. I tried installing the latest version 2017.2.2 and seems to be that the issue is gone for me. But it is typescript analysis is very slow.
For me, ReSharper was not detecting my types referenced by "/// <reference types="dwt" />" because I did not have the node_modules\@types folder included in the solution/project. It would be nice for ReSharper to scan the file system as a fallback.
With version 17.3 I still do have this annoying problem. Jetbrains please, please, please solve this issue!!!!!!!!!
Hello Thomas!
Thank you for the feedback.
Could you please provide some demo solution introducing the problem?
Thanks in advance!
This is a terrible workaround, but I set the inspection severity for this incident to "Hint". At least it's better than suspending Resharper every time I use LoDash. Once RSRP-466528 is resolved, I'll set it back to Error.
RSRP-466528 was marked fixed in the latest prerelease version R# 2018.1 EAP 6, but I am still experiencing this problem. I have the jquery typedef in my project, for instance, which Visual Studio happily recognizes and uses for autocompletion, but R# still throws an error as an unresolved reference no matter what I try.
Still having this problem in JetBrains ReSharper Ultimate 2018.1.2 Build 112.0.20180530.113618
ReSharper 2018.1.20180530.115351
VS 2017 Version 15.7.3
Typescript version 2.3
All lodash methods used in my project get this error.
I'm also getting the error.
JetBrains ReSharper Ultimate 2018.1.2 Build 112.0.20180530.113618
ReSharper 2018.1.20180530.115351
Visual Studio 2017 15.7.4
[my-project].csproj:
<TypeScriptToolsVersion>2.8</TypeScriptToolsVersion>
ts complier gives no error and and produced js works fine.
/Morten
This issue happens a few time a day in my environment. Usually what helps for me is to clear the Resharper cache and restart Visual Studio. Not sure what triggers this behavior though.
This started happening for me after I updated my TypeScript version from 2.1 to 3.0.0.
VS 2017 15.7.6
Typescript version 3.0
Resharper 2018.1.4
I have the same problem. A simple file Test.ts:
Snippet
Fails with the same problem.
This is a sample solution that shows the problem (ReSharper 2018.1.4).
https://www.dropbox.com/s/krnqcq1ap6hmiaa/TestWebApp.zip?dl=0
Hello Njaal and Pfmontilla!
Please try the latest ReSharper 2018.2 EAP build - https://www.jetbrains.com/resharper/eap/ and check if the problem is still reproduced.
Thank you.
That did the trick. It worked perfectly.
When do you think 2018.2 will be ready?
Thank you.
I'm running 2018.2 but unfortunately still encounter this issue. TypeScript using ReSharper seems to not even remember that 'Array' is a symbol. The TypeScript compiler works just fine.
Hello,
Our team is having this issue with .ajax.done as shown by mma71 here: https://resharper-support.jetbrains.com/hc/en-us/community/posts/203464224-typescript-symbol-cannot-be-properly-resolved-?page=2#community_comment_360000039299
Our versions:
- JetBrains ReSharper Ultimate 2018.2.3 Build 182.0.20180912.70621
- ReSharper 2018.2.20180912.160227
- Visual Studio Professional 2017 Version 15.8.9
- Typescript 3.0 (using VS17 TypeScript Build)
I've tried clearing the cache, disabling / re-enabling ReSharper all to no avail.
I'm now following this topic with the hopes of a fix.
Hello Hakki!
Thank you for the feedback.
Please try the latest ReSharper 2018.3 EAP build - https://www.jetbrains.com/resharper/eap/.
If the problem persists we'd be very grateful if you could provide sample solution demonstrating the problem? You can do it privately via 'Submit a request' form and we can sign NDA if needed.
Thank you.
Hello Angelina,
Thank you for your reply. We have created a quick sample project and submitted a request (FYI, the ticket number is #1876386).
If any information comes out from that ticket I'll update this thread for general knowledge (i.e : Googlers ;) )
Having same issue as @Hakki Sahinkaya in post above.
JetBrains ReSharper Ultimate 2018.3.2 Build 183.0.20190124.112722
ReSharper 2018.3.2
VS Community 2017 v15.9.4
Getting error on ajax.done "symbol 'done' cannot be properly resolved"; this is in typescript file.
Project compiles and runs fine.
False alerts from ReSharper is rendering the tool of no value for the current task. Any solution to this yet?
Tried everything suggested, including clearing caches, deleting node_modules directory, restarting VS...nothing fixes the issue.
Hello Hassan!
This isn't some consistent problem. There are different issues causing 'symbol X cannot be properly resolved', we need code to investigate problem in every case.
Is there any chance you could share the solution you're experiencing problem with? You can do it privately via 'Submit a request' form and we can sign NDA if needed.
Thank you.
Thanks Angelina
As requested I have created a very simple project that demonstrates this behaviour. Ticket #1970917. If you are able to help to push that one along for a quick response it will be much appreciated.
Thank you
I'm also experiencing the same problem with my solution.
Unfortunately, I can't share the code in it (yet), but decided to report anyway so the Resharper team can have more data when trying to figure out what is causing this.
Resharper Version: JetBrains ReSharper Ultimate 2019.1.1 Build 191.0.20190501.122851
Visual Studio Version: Visual Studio Professional 2019 (Version 16.0.3)
The problem disappears when I go to Tools>Options>Resharper>General and click 'Suspend Now' then 'Resume Now'.
The fix is to exclude from project, wait for ReSharper to process the file exclusion and to then include in project the .ts file where the symbol that's not found is exported.
As @... says; go to Tools>Options>Resharper>General and click 'Suspend Now', but don't bother with 'Resume Now'.
Hello folks,
We'd be grateful if you could share with us some sample solutions in which the problem is reproduced so we could investigate it. It can be done privately via "Submit a request" form at the top of the page.
Also log file could be helpful, you can collect it by starting VS with the following command: ``devenv.exe /ReSharper.LogFile C:\log\resharper_log.txt /ReSharper.LogLevel Verbose``, then reproduce the issue and send us resharper_log.txt.
Thank you.