postcss / postcss-cli

CLI for postcss
Other
836 stars 93 forks source link

Cannot find module 'postcss' #373

Closed Hongbusi closed 3 years ago

Hongbusi commented 3 years ago

npm i postcss postcss-cli -D

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

I want to know why. Thank you~

as follows:

image

RyanZim commented 3 years ago

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.