webpack-contrib / postcss-loader

PostCSS loader for webpack
MIT License
2.86k stars 211 forks source link

Peer dependencies for cosmiconfig-typescript-loader not met #637

Closed mdrodz closed 1 year ago

mdrodz commented 1 year ago

Bug report

postcss-loader doesn't provide @types/node, ts-node and typescript, requested by "cosmiconfig-typescript-loader"

Actual Behavior

This breaks PnP for Yarn

Expected Behavior

postcss-loader should include these packs as dependencies since it is requested by a package it uses

How Do We Reproduce?

Using Yarn v2 PnP, install the package and the warning will appear

alexander-akait commented 1 year ago

Please look at https://github.com/webpack-contrib/postcss-loader/releases/tag/v7.2.1

alexander-akait commented 1 year ago

We don't use ts-node directly so we should not provide peer deps in the package

mdrodz commented 1 year ago

Maybe this is a bug with the cosmiconfig-typescript-loader package.json then?

Because it states that it needs a ts-node in the environment (peer deps).

Also, even with the latest patch (7.2.1), I still have the same errors:

Yarn v2 pnp error
alexander-akait commented 1 year ago

What is yarn version?

mdrodz commented 1 year ago

Yarn version is 3.5.0

alexander-akait commented 1 year ago

Looks like bug is there https://github.com/Codex-/cosmiconfig-typescript-loader/blob/main/package.json#L36, they should be optinal

alexander-akait commented 1 year ago

I can't add them as dependecies, because we don't use it directly, putting them in peer deps doesn't solve nothing...

mdrodz commented 1 year ago

Yup, it seems to be their problem:

https://github.com/Codex-/cosmiconfig-typescript-loader/issues/79

Thanks!