Unable to load plugin clean-css please make sure that it is installed under or at the same level as less
Asked Answered
W

1

5

I have a bash script that minifies all my less files and outputs the result into a .min.css file. I have already looked at other answers on similar questions, but nothing works. After updating to Mac OS Catalina today my bash script stopped working and is giving this error:

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

This is part of the contents of my minify bash script :

YOORS=$(pwd)
...
cd ${PROJECT}/less
...

printf "%-${WIDTH}s %10s\n" "Compiling lessfile content" $(~/node_modules/.bin/lessc --clean-css plugins/lessfile.less > ${PROJECT}/web/css/plugins/lessfile.min.css && echo "${GREEN}[OK]${NC}" || echo "${RED}[FAIL]${NC}")

It is weird, since firing the command in the command line works perfectly fine, but the bash script suddenly stopped working.

Clean-css is installed on my pc:

MacBook-Pro:yoors user$ cleancss -v
4.3.0
Woolgrower answered 13/10, 2019 at 17:50 Comment(0)
P
8

Had the same error, but in another environment. Installed the clean-css plugin for less, then it worked:

npm install -g less-plugin-clean-css
Plumbism answered 27/11, 2020 at 9:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.