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

Module Not found 'pages/giftshop/giftshop.module.scss'React TS CSS #109

Open
danielkoller opened this issue Sep 25, 2023 · 11 comments · Fixed by #113 or #183
Open

Module Not found 'pages/giftshop/giftshop.module.scss'React TS CSS #109

danielkoller opened this issue Sep 25, 2023 · 11 comments · Fixed by #113 or #183
Assignees
Labels
bug Something isn't working

Comments

@danielkoller
Copy link

danielkoller commented Sep 25, 2023

Describe the bug
Every styles import throws an error. It says that the module is not found although it is there and the styling is applied. The settings of your extension are default.

To Reproduce
Steps to reproduce the behavior:
As soon as a file is opened, the import shows an error. Running yarn, restarting the server or reloading the developer window doesn't help.

Expected behavior
There should not be an error, because the file is there.

Screenshots
Bildschirmfoto 2023-09-25 um 11 14 30
Bildschirmfoto 2023-09-25 um 11 14 52

Desktop (please complete the following information):

  • OS: macOS
  • Version 13.5.2

Additional context
Running the latest version of React CSS Modules and played around with older versions - didn't help unfortunately. Thanks for the great extension nonetheless!

@danielkoller danielkoller added the bug Something isn't working label Sep 25, 2023
@Viijay-Kr
Copy link
Owner

@danielkoller Thanks for reporting this issue. I apologise for the frustration. This issue could have been a regression since #97 went live. Until I find time to fix this one you could toggle the diagnostics setting off to help you from these annoying red markers

@danielkoller
Copy link
Author

@Viijay-Kr thank you for your reply and the great plugin. I will toggle the diagnostics off for now.

@Viijay-Kr
Copy link
Owner

Viijay-Kr commented Oct 16, 2023

@danielkoller by any chance do you use jsconfig path aliases ? if so can you share it with me ?

@danielkoller
Copy link
Author

Hi @Viijay-Kr, I do. Here you go ->

"paths": {
"@/components/": [
"src/components/
"
]
}

@Viijay-Kr
Copy link
Owner

Ok that's great .Thanks :). #113 this should fix the issue

@Viijay-Kr
Copy link
Owner

@danielkoller This should be fixed with the latest version of the extension. Do let me know if you find any issues

@danielkoller
Copy link
Author

@Viijay-Kr no issues, thanks for the great work and fast fix. :)

@logone72
Copy link

@Viijay-Kr
version: v3.2.5
I am still experiencing the same issue. It occurs when importing through the path alias.

image

following is my jsconfig.json.

{
  "compilerOptions": {
    "baseUrl": "src",
    "paths": {
      "@src/*": ["."],
      "@pages/*": ["pages/*"],
      "@common/*": ["common/*"],
      "@comComponents/*": ["common/components/*"],
      "@service/*": ["service/*"],
      "@model/*": ["model/*"],
      "@commonComponents/*": ["pages/common/*"]
    }
  },
  "include": ["src"]
}

Your extension would be fantastic if it could resolve this issue.

@Viijay-Kr
Copy link
Owner

@logone72 can you also provide me the path of the file where you see this error ?

@Viijay-Kr
Copy link
Owner

@logone72 can you try updating v3.2.6 and see if the issue is fixed for you ?

@Maki-Db
Copy link

Maki-Db commented Jan 11, 2025

This is my jsconfig.json.

{
  "compilerOptions": {
    "paths": {
      "@/*": ["./src/*"]
    },
    "types": ["cypress", "@testing-library/cypress"]
  },
  "exclude": ["node_modules", "dist"]
}

I'm getting the same error, "module not found". Changing @ to src resolves the problem. I'm on version 3.2.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants