What i am doing wrong?
See original GitHub issueHi, i trying to use this plugin but i have some problems.
In my React project with js/ts/jsx/tsx files bundled by webpack with ts-loader i have error message in typescript log (in VS Code) and i do not have autocomplete for scss module default import properties.
I have installed plugin like this:
yarn add -D typescript-plugin-css-modules
my tsconfig.json looks like this:
{
"compilerOptions": {
"outDir": "./build",
"allowJs": true,
"jsx": "react",
"module": "commonjs",
"target": "es6",
"esModuleInterop": true,
"plugins": [
{
"name": "typescript-plugin-css-modules",
"options": {
"customMatcher": "\\.scss$"
}
}
]
},
"include": [
"./src/**/*",
"module.d.ts"
]
}
I added module.d.ts file to root directory of my project with this content:
declare module '*.scss' {
const classes: { [key: string]: string };
export default classes;
}
But in tsx popup with info about imported classes looks like this:

In TS Server Log in VS Code i have this error:
Info 27 [13:26:55.840] Failed to load module 'typescript-plugin-css-modules' from /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/node_modules: Error: Could not resolve JS module 'typescript-plugin-css-modules' starting at '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/node_modules'. Looked in: /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript-plugin-css-modules/package.json...
in my project i have these dev dependencies:
"ts-loader": "^8.0.1",
"typescript": "^3.9.7",
"typescript-plugin-css-modules": "^2.4.0",
what am I doing wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
I feel stuck in life, what am I doing wrong? - Quora
The only thing you are doing wrong is if you are not putting any effort for coming out. We all get stuck and...
Read more >Ep #142: Finding the Answer: What Am I Doing Wrong?
Discover how to answer the question, “What am I doing wrong?” and do so with the intention of self-healing instead of self-loathing.
Read more >Clasio & Rosenfeld – What Am I Doing Wrong? Lyrics - Genius
What Am I Doing Wrong? Lyrics: I need your touch / And I will show you / Just one's enough / Our bodies...
Read more >What am I doing wrong? : r/socialskills - Reddit
What am I doing wrong? Hello everybody. First, I just wanted to say 'hi' to ...
Read more >What Am I Doing Wrong? Lyrics - Clasio & Rosenfeld - AZLyrics
"What Am I Doing Wrong?" I need your touch. And I will show you. Just one's enough. Our bodies flowing. Now, but no....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@mrmckeb I am not sure if this helps, commenting for posterity, or anyone else who comes across this issue.
Upgrading the library, deleting node_modules, re-installing, re-starting vscode seemed to fix this issue!
Thank you.
it looks like the option is just not being output in command palette when file is not have
.js/.tsextension, i found its option and its fully worked for mei think issue can be closed