Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto Complete Fails with TypeScript 5.0.0 #387

Closed
ricardroberg opened this issue Nov 28, 2022 · 22 comments
Closed

Auto Complete Fails with TypeScript 5.0.0 #387

ricardroberg opened this issue Nov 28, 2022 · 22 comments

Comments

@ricardroberg
Copy link

Styled component stop working with JS and TS NIghtly v5.0.20221113 and above.

styled-component 1.73.1

No intelisense

https://github.com/microsoft/vscode-typescript-next/issues/61

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Nov 28, 2022

@ricardroberg was that link supposed to go somewhere?

Do you have any errors? Like do you run the typescript server with “trace” enabled

@ricardroberg
Copy link
Author

@jasonwilliams Sorry...never done that. Its began like 7 to 10 days ago. Just found 2hours ago which plugin was in conflict.

@booooora
Copy link

microsoft/vscode-typescript-next#61 (comment)

Guess he linked it to wrong url.
I'm having a same issue and this is the issue I left to TS nightly a week ago. 🥲

@ricardroberg
Copy link
Author

Yes @booooora . Thank you a lot.

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Nov 29, 2022

Ok thanks for raising this.
I think https://github.com/microsoft/typescript-styled-plugin needs updating.

Microsoft no longer maintain that repo so we will need to fork it and update it.

Also related to: microsoft/typescript-styled-plugin#149

@jasonwilliams
Copy link
Collaborator

This issue is being looked at in microsoft/TypeScript#51713

@vilicvane
Copy link

vilicvane commented Mar 19, 2023

It seems that @mjbvz has already fixed this in typescript-template-language-service-decorator months ago but never released the new version.

Just validated that fix in typescript-styled-plugin and e2e tests do pass with TypeScript 5.0.

microsoft/typescript-template-language-service-decorator#27

@jasonwilliams jasonwilliams changed the title Styled-Component Not working with JavaScript and TypeScript Nightly Auto Complete Fails with TypeScript 5.0.0 Apr 1, 2023
@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Apr 1, 2023

Ok I understand we have a lot of users with the issue of auto complete failing due to the TypeScript update.
Sadly, the bad news is this is an upstream issue which is out of my control to fix. It has been fixed in https://github.com/microsoft/typescript-template-language-service-decorator (as @vilic pointed out) but there's been no release.

I've pulled the latest commit from https://github.com/microsoft/typescript-template-language-service-decorator and tested it and I can see auto complete works.

I have also raised this with the team.

You will either need to roll back your typescript version, or get onto the people upstream to make a release.

@admiralrohan
Copy link

This was happening to me after I updated VS code. The easiest fix is to add this to VS code local settings.

"typescript.tsdk": "node_modules/typescript/lib"

@jasonwilliams
Copy link
Collaborator

I have done a pre-release for 1.7.7
Let me know if this fixes the issue here please.

If enough people find it works ill push it out as a normal release.

@Aluisio
Copy link

Aluisio commented Apr 4, 2023

I updated the plugin to the pre-release version (1.7.7) and it worked again. I will continue testing.
VS Code version: 1.77.0
vscode-styled-components version: 1.7.7

@kostiuck
Copy link

kostiuck commented Apr 4, 2023

all good, thanks!

@ricardroberg
Copy link
Author

Pre-release 1.7.7 working with JavaScript and TypeScript Nightly v5.1.20230403
Thank you!

@MeHighLow34
Copy link

Pre-release version works. Thanks!

@gillescoolen
Copy link

Yep, pre-release version fixes the issue!

@jasonwilliams
Copy link
Collaborator

jasonwilliams commented Apr 5, 2023

Ok thanks for the confirmations

v1.7.8 has now been published as a normal release so that will be rolling out now.
Now that saga is over I'm closing this issue!

@paprikman
Copy link

Ok thanks for the confirmations

v1.7.8 has now been published as a normal release so that will be rolling out now. Now that saga is over I'm closing this issue!

I highly appreciate the work you've done, but the intellisense does not work with <5 versions of typescript after upgrading to v1.7.8. So I had to rollback. Can I somehow help to troubleshoot this one?

@jasonwilliams
Copy link
Collaborator

Hi @paprikman
You’re right this is now incompatible with TypeScript < 5 and also the latest version of VSCode.

I don’t have any advice to offer other than rollback the version to 1.7.5 or update your typescript to 5.0.0

@paprikman
Copy link

Hi @paprikman You’re right this is now incompatible with TypeScript < 5 and also the latest version of VSCode.

I don’t have any advice to offer other than rollback the version to 1.7.5 or update your typescript to 5.0.0

This is sad news. I think it makes sense to add that to the README then. Not everyone has options to change TS version in their projects at will.

@leognmotta
Copy link

I can agree, it cannot rely on TS version 5

@jasonwilliams
Copy link
Collaborator

Hi @paprikman You’re right this is now incompatible with TypeScript < 5 and also the latest version of VSCode.
I don’t have any advice to offer other than rollback the version to 1.7.5 or update your typescript to 5.0.0

This is sad news. I think it makes sense to add that to the README then. Not everyone has options to change TS version in their projects at will.

https://github.com/styled-components/vscode-styled-components/tree/main#intellisense-is-not-working

@kylemh
Copy link

kylemh commented Jul 21, 2023

Hello @jasonwilliams

Took me awhile to find this issue and discover why my stuff wasn't working... Before I open a PR against the README, I want to ask is 1.7.5 required? The update from this thread was 1.7.8.

Is 1.7.6 or 1.7.7 incompatible with TS <v5?

edit: Oh there is no 1.7.6 or 1.7.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests