vbenjs / vite-plugin-svg-icons

Vite Plugin for fast creating SVG sprites.
MIT License
804 stars 110 forks source link

Issues with peer dependencies found #47

Open JackieCheung opened 2 years ago

JackieCheung commented 2 years ago

There is a warning message after npm install:

 WARN  Issues with peer dependencies found
.
└─┬ vite-plugin-svg-icons
  └─┬ svg-baker
    └─┬ postcss-prefix-selector
      └── ✕ unmet peer postcss@"7.x || 8.x": found 5.2.18
zybieku commented 2 years ago

+1

aipeli commented 2 years ago

+1

leosin commented 2 years ago
WARN  Issues with peer dependencies found
packages/dt-ebeca-manual
└─┬ vite-plugin-svg-icons
  └─┬ svg-baker
    └─┬ postcss-prefix-selector
      └── ✕ unmet peer postcss@"7.x || 8.x": found 5.2.18 in svg-baker
eshimischi commented 2 years ago

https://github.com/RadValentin/postcss-prefix-selector/pull/95

RadValentin commented 2 years ago

Looking at the messages posted above and at this, I see that svg-baker has a dependency on postcss@^5.2.17 and on postcss-prefix-selector@^1.6.0. In the latest versions of postcss-prefix-selector I've limited the versions of postcss that the prefixer supports to 7 and 8 which was causing the errors to show up.

I tested running the prefixer with postcss@5 and the unit tests ran fine so I think it's ok to loosen the version restriction, changed it to "postcss": ">4 <9" in postcss-prefix-selector@1.15.0

TL;DR This should be fixed now, on npm install, svg-baker will pull in the latest prefixer with the new dependency range and it will stop complaining :D

eshimischi commented 2 years ago

Looking at the messages posted above and at this, I see that svg-baker has a dependency on postcss@^5.2.17 and on postcss-prefix-selector@^1.6.0. In the latest versions of postcss-prefix-selector I've limited the versions of postcss that the prefixer supports to 7 and 8 which was causing the errors to show up.

I tested running the prefixer with postcss@5 and the unit tests ran fine so I think it's ok to loosen the version restriction, changed it to "postcss": ">4 <9" in postcss-prefix-selector@1.15.0

TL;DR This should be fixed now, on npm install, svg-baker will pull in the latest prefixer with the new dependency range and it will stop complaining :D

thanks for your time, Sir! and good luck with your library as well.

eshimischi commented 2 years ago

@JackieCheung this issue is solved, checked it - now it's all gone.