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

Loading VS Code with Broken TS File Causes Extension Not to Load #21

Closed
karlhorky opened this issue Jan 6, 2023 · 8 comments · Fixed by #22
Closed

Loading VS Code with Broken TS File Causes Extension Not to Load #21

karlhorky opened this issue Jan 6, 2023 · 8 comments · Fixed by #22
Labels
bug Something isn't working enhancement New feature or request

Comments

@karlhorky
Copy link
Collaborator

karlhorky commented Jan 6, 2023

Loading VS Code with a TypeScript error in it causes the extension not to load with the error message "Something went wrong while activating React-TS-CSS extension":

Screenshot 2023-01-06 at 13 46 54

Eg. this code, which results in an Identifier expected. error from TypeScript:

// page.tsx
import styles from './page.module.scss';

export default function Login() {
  return <div className={styles.} />; // 💥 "Identifier expected." error (because of the dot without any property)
}

And the CSS:

// page.module.scss
.bodyBold {
  display: flex;
  flex-direction: column;
  align-items: center;

  & h2 {
    padding: 0 40px;
  }
}
@Viijay-Kr
Copy link
Owner

@karlhorky Thanks for reporting this .

This should be an easy fix.

However the extension would work only after the TS errors are cleared.

@karlhorky
Copy link
Collaborator Author

karlhorky commented Jan 6, 2023

@Viijay-Kr great, thanks for the quick fix! Testing version 1.2.3 now...

@karlhorky
Copy link
Collaborator Author

karlhorky commented Jan 6, 2023

Hm, it seems like the error is still there with version 1.2.3 - do you think that there is another problem somewhere not solved by #22?

@Viijay-Kr
Copy link
Owner

@karlhorky well I couldn't it reproduce it , do you have a different scenario that is breaking it ?

@karlhorky
Copy link
Collaborator Author

karlhorky commented Jan 7, 2023

Interesting, now I cannot reproduce anymore either :) Seems like it's good (at least for now!) In case it comes back later I'll reply here.

The extension auto-updated itself to 1.3.0 (maybe that fixed it?), although the changelog doesn't contain any entries for this version...

@Viijay-Kr
Copy link
Owner

Viijay-Kr commented Jan 7, 2023

@karlhorky Yes 1.3.0 fixes it Thanks for pointing it out. I will update the change log . I missed it .

@Viijay-Kr
Copy link
Owner

@karlhorky change log is update now

@karlhorky
Copy link
Collaborator Author

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants