Skip to content

Postcss-nesting v12.0.4 is missing types field in package.json #1313

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

Closed
deluksic opened this issue Mar 5, 2024 · 5 comments
Closed

Postcss-nesting v12.0.4 is missing types field in package.json #1313

deluksic opened this issue Mar 5, 2024 · 5 comments

Comments

@deluksic
Copy link

deluksic commented Mar 5, 2024

Looks like "postcss-nesting": 12.0.4 is missing "types": "./dist/index.d.ts", from its package.json causing typescript to not be able to find typings. When I re-add it, it works. Typescript 5.3.3.

@deluksic
Copy link
Author

deluksic commented Mar 5, 2024

What do I need to change in order for tsc to pass again? (bumped from 12.0.1)

Edit:
I have

"module": "ESNext",
"moduleResolution": "node",

but it should not be node?

@romainmenke
Copy link
Member

node indicates that your context is commonjs.

Setting moduleResolution to nodeNext or node16 might help.
https://www.typescriptlang.org/tsconfig#moduleResolution

But keep in mind that this does have an overal effect and could surface other issues.
Setting a @ts-expect-error comment for postcss-nesting or providing empty placeholder types might be a more light weight solution.

@deluksic
Copy link
Author

deluksic commented Mar 5, 2024

OK, bundler option seems to be working, also with all other CI steps. I'm not using node for anything other than the dev server / tests, so this should be most appropriate. Thank you for the quick response.

@deluksic deluksic closed this as completed Mar 5, 2024
@romainmenke
Copy link
Member

Always happy to help 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants