{"id":25861,"library":"less-watch-compiler","title":"less-watch-compiler","description":"A CLI tool that watches LESS file changes and automatically compiles them to CSS using the `lessc` compiler. Version 1.17.5 released intermittently; supports Node >=18. Key differentiator: it tracks dependency trees so changes to imported LESS files trigger recompilation of parent files. Filesystem watcher with options for source maps, plugins, and configuration files.","status":"active","version":"1.17.5","language":"javascript","source_language":"en","source_url":"https://github.com/jonycheung/deadsimple-less-watch-compiler","tags":["javascript","less","lessc","compiler","file system","watcher","watch","compile","folder","typescript"],"install":[{"cmd":"npm install less-watch-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add less-watch-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add less-watch-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"The `lessc` binary must be installed globally to compile LESS files.","package":"less","optional":false}],"imports":[{"note":"The tool is a CLI, not a library. It requires the `less` package to be installed globally.","wrong":"Installing globally without lessc","symbol":"CLI usage","correct":"npx less-watch-compiler src dist"}],"quickstart":{"code":"# Install LESS and less-watch-compiler globally\nnpm install -g less less-watch-compiler\n\n# Watch src folder and output to dist\nless-watch-compiler src dist\n\n# With main file (recompile only main.less on any change)\nless-watch-compiler src dist main.less\n\n# Using configuration file\nless-watch-compiler --config less-watch-compiler.config.json\n\n# Run once and exit\nless-watch-compiler src dist --run-once","lang":"javascript","description":"Basic usage of less-watch-compiler: global install, watching folders, specifying main file, config file, and run-once."},"warnings":[{"fix":"Run `npm install -g less` before using less-watch-compiler.","message":"Requires global installation of `less` package to provide `lessc` binary.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Node.js to version 18 or later.","message":"Node >=18 required as of v1.17.0.","severity":"breaking","affected_versions":">=1.17.0"},{"fix":"Monitor less-watch-compiler updates for compatibility changes.","message":"The `lessc` binary may be deprecated in future LESS versions. The tool relies on `lessc` and may break if LESS changes its CLI.","severity":"deprecated","affected_versions":"all"},{"fix":"Use directories, not globs, for source and destination parameters.","message":"Glob patterns in source/destination may not work as expected; only directories are watched.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run `npm install -g less` to install the lessc binary.","cause":"LESS is not installed globally.","error":"lessc: command not found"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}