Languages

lessc - Compress css error - Unable to load plugin clean-css please make sure that it is installed under or at the same level as less

4 points
Asked by:
Bartek
1205

I try to compress css files with lessc command.

I get this error:

$ lessc loading.css --clean-css="--s1 --advanced --compatibility=ie8" > output_file.min.css
Unable to load plugin clean-css please make sure that it is installed under or at the same level as less

How can I fix it?

1 answers
6 points
Answered by:
Bartek
1205

As I see, less is installed, but lessc not.

You need to install less-plugin-clean-css.

So, run the command:

npm install -g less-plugin-clean-css

More detailed description you can find:

  1. in the article: https://dirask.com/posts/LESS-CSS-minify-css-file-1e9rb1
  2. on official npm page: https://www.npmjs.com/package/less-plugin-clean-css
0 comments Add comment
Hey 👋
Would you like to know what we do?
  • Dirask is online IT community for professionals and hobbyist to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.