gluestack-ui icon indicating copy to clipboard operation
gluestack-ui copied to clipboard

Typescript autocompletion broken in Webstorm

Open vaniyokk opened this issue 1 year ago • 9 comments

Description

Typescript autocompletionand types resolutiuon is not working in Webstorm on ejected theme

CodeSandbox/Snack link

No response

Steps to reproduce

See new comments in this closed issue for details, it's not resolved. https://github.com/gluestack/gluestack-ui/issues/1388

Here is reproduction repo: https://github.com/vaniyokk/gluestack-test

While it's resolving custom types: 14109

I have dupicate declarations when "Go to Declaration": image

And completely missed code completion for all props: image

gluestack-ui Version

1.0.39

Platform

  • [ ] Expo
  • [X] React Native CLI
  • [ ] Next
  • [ ] Web
  • [ ] Android
  • [ ] iOS

Other Platform

No response

Additional Information

No response

vaniyokk avatar Jan 24 '24 19:01 vaniyokk

Try VS Code. It's known issue that WebStorm (and also all IntelliJ) has inference problems. I switched to VS Code and most, if not all, problems went away.

Aleksa-startify avatar Jan 25 '24 02:01 Aleksa-startify

Same here!

AwesomeAndrewMK avatar Feb 15 '24 11:02 AwesomeAndrewMK

Try VS Code. It's known issue that WebStorm (and also all IntelliJ) has inference problems. I switched to VS Code and most, if not all, problems went away.

I am having this issue in vscode too after upgrading to latest version I was on 1.0.35 it was working fine now I am in 1.1.8 it stopped working

endrits079 avatar Feb 20 '24 22:02 endrits079

Try VS Code. It's known issue that WebStorm (and also all IntelliJ) has inference problems. I switched to VS Code and most, if not all, problems went away.

I am having this issue in vscode too after upgrading to latest version I was on 1.0.35 it was working fine now I am in 1.1.8 it stopped working

My issue was that I manually updated to latest version by uninstalling and reinstalling the @gluestack-ui/themed but I didn't update @gluestack-style/react and @gluestack-ui/config, updating these 2 fixed the issue

endrits079 avatar Feb 20 '24 23:02 endrits079

@endrits079 I believe it's a deeper problem with typescript and inference problem and it will come back again. Try next time doing in VS Code "Reload Window" (It restarts type script server). And equivalent in Intellij File->Invalidatet Cashes.. -> just restart. I believe problem will be "solved".

Aleksa-startify avatar Feb 20 '24 23:02 Aleksa-startify

@endrits079 I believe it's a deeper problem with typescript and inference problem and it will come back again. Try next time doing in VS Code "Reload Window" (It restarts type script server). And equivalent in Intellij File->Invalidatet Cashes.. -> just restart. I believe problem will be "solved".

I had tried that but for me didn't work

endrits079 avatar Feb 21 '24 07:02 endrits079

This is a real problem... And I'm not going to change my IDE for that

LivioGama avatar Mar 14 '24 04:03 LivioGama

I found a temporary workaround. You just need to go to your node_modules, find @gluestack-ui dependency, right click on it, Mark directory as > Cancel exclusion

CleanShot 2024-03-14 at 06 47 10@2x

Then the autocompletion is back. CleanShot 2024-03-14 at 06 49 50@2x

LivioGama avatar Mar 14 '24 05:03 LivioGama

I tried both @LivioGama and @endrits079 suggestions and both don't work. Likewise, I don't really want to go changing IDE... Any other suggestions?

fredlemieux avatar Jun 01 '24 11:06 fredlemieux