-
-
Notifications
You must be signed in to change notification settings - Fork 75
TypeScript error after upgrading postcss-preset-env from 9.3.0 to 9.4.0 #1295
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
Comments
Hi @doberkofler, In the past we had an incorrect setup and config which made it so that types were broken for everyone but TypeScript silently ignored all this. Since your project is commonjs you will get a warning that there aren't any types, which is correct since we don't provide any for commonjs. |
For more context on this change : #1031 (comment) |
Thank you! |
Hello, i am specifying "type": "module" in my package.json and using |
Hi @johuhype, You should check your tsconfig. https://www.typescriptlang.org/docs/handbook/modules/theory.html#the-module-output-format There might be other issues or configs that are needed, but that is the most common source of issues that I know of. |
That was fast. Thanks for the information! |
Reproduction link
No response
Bug description
scripts-ts/bundle.ts:25:30 - error TS7016: Could not find a declaration file for module 'postcss-preset-env'. '/Users/doberkofler/MyDev/ljs_app/trunk/periscope/node_modules/postcss-preset-env/dist/index.cjs' implicitly has an 'any' type.
Try
npm i --save-dev @types/postcss-preset-env
if it exists or add a new declaration (.d.ts) file containingdeclare module 'postcss-preset-env';
25 import postcssPresetEnv from 'postcss-preset-env';
~~~~~~~~~~~~~~~~~~~~
Actual Behavior
No response
Expected Behavior
No response
Can you reproduce it with
npx @csstools/csstools-cli <plugin-name> minimal-example.css
?N/A
npx
OutputNo response
Extra config
No response
What plugin are you experiencing this issue on?
PostCSS Preset Env
Plugin version
9.4.0
What OS are you experiencing this on?
macOS
Node Version
20.11.0
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: