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
TypeScript does not recognize the .d.ts file of media-query-list-parser #1381
Comments
We do not support typings for commonjs. See : https://www.typescriptlang.org/docs/handbook/modules/reference.html#module-format-detection |
What can I do for this problem? I think "Node16" also supports ES modules.
https://www.typescriptlang.org/docs/handbook/modules/theory.html#the-module-output-format |
I don't know how you should fix your problem :) You can create a GitHub repo with a complete but minimal reproduction. In the abstract you have to instruct TypeScript that you are writing If that is setup correctly TypeScript will find the |
I prepared a repository here. I verified and found that Could you please take a look and see if you can reproduce the problem on your end? Thanks! |
Hi @ttfan240, You need to specify This is explained in that first link I posted :) See : https://www.typescriptlang.org/docs/handbook/modules/reference.html#module-format-detection |
Thanks, the error is solved! If I add Now the error message is below:
Is it not possible to import without
|
There isn't any default export in this package. Just use the regular, non-default exports :) |
Sure, thanks again for everything! |
Reproduction link
No response
Bug description
Hello, I'm trying to use your library and I have a elementary question.
I'm reading the referrence about tsconfig.json, but I can't solve my problem yet.
Now I just import the library from a project that the runtime module is
Node16
.The tsconfig.json is set like below. (If I set
module
"ES2022" andmoduleResolution
"Bundler", the error disappers.)VSCode shows the following error.
Actual Behavior
No response
Expected Behavior
No response
Can you reproduce it with
npx @csstools/csstools-cli <plugin-name> minimal-example.css
?None
npx
OutputNo response
Extra config
No response
What plugin are you experiencing this issue on?
No response
Plugin version
2.1.9
What OS are you experiencing this on?
Windows
Node Version
20.12.1
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: