csstools / postcss-nesting

Nest style rules inside each other

Home Page:https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not find a declaration file

verpixelt opened this issue · comments

I'm trying to run postcss with webpack in a simple bare bone setup. I get the following message in my editor:

Could not find a declaration file for module 'postcss-nesting'. '/Users/verpixelt/study/development/webpack-demo/node_modules/postcss-nesting/index.cjs.js' implicitly has an 'any' type.
  Try `npm install @types/postcss-nesting` if it exists or add a new declaration (.d.ts) file containing `declare module 'postcss-nesting';`ts(7016)

Running webpack doesn't result in an error tho the plugin does not work. I've tried both referencing the plugin inside the webpack.config.js and in a dedicated postcss.config.js with the same result.

Any idea what's going on here?

I've put everything in a repo: https://github.com/verpixelt/webpack-demo

The plugin is working correctly. I was using the wrong CSS syntax all along. My mistake.

Where did you find @types/postcss-nesting ?