postcss/postcss-cli

Cannot find module 'postcss'

Hongbusi opened this issue · 1 comments

npm i postcss postcss-cli -D

execute npm postcss ==> Cannot find module 'postcss'

I want to know why. Thank you~

as follows:

image

You're running postcss directly from the command line, so it's using the globally installed version of postcss-cli. Run it from within an npm script, or use npx postcss.