cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.02k stars 174 forks source link

when I run: yarn add postcss-pxtorem, I get a warning " > postcss-pxtorem@6.0.0" has unmet peer dependency "postcss@^8.0.0". #72

Open wx995405425 opened 3 years ago

wx995405425 commented 3 years ago

This is my project`s package.json. image

The waning image

This is this postcss-pxtorem`s package.json image

This is this postcss`s package.json image

wx995405425 commented 3 years ago

@cuth How to solve this problem? Do you need to modify the source code?

wx995405425 commented 3 years ago

postcss is built in vite. I don't want to reinstall postcss.

cuth commented 3 years ago

Try adding Postcss to the package.json of your project.

wx995405425 commented 3 years ago

@cuth It works。Thanks

LiZhaji commented 3 years ago

Help. I got the same problem when running with npm: Syntax Error: Error: PostCSS plugin postcss-pxtorem requires PostCSS 8. And then I add postcss v8.3.0 to the package.json, but it does't work.

xiaoyang678 commented 2 years ago

PostCSS plugin postcss-pxtorem requires PostCSS 8.

image

xxwangkaimin commented 2 years ago

I downloaded postcss-pxtorem@lastest,postcss@lastest,postcss-loader@lastest,But still report an error.