lessc binary not available after installing less via NPM lessc binary not available after installing less via NPM node.js node.js

lessc binary not available after installing less via NPM


When you install LESS via npm use the -g option to install it globally.

npm install -g less


When installing packages with npm you have two options:

  1. Install them globally: npm install -g <package>
  2. Install locally in your home directory under ~/.npm: npm install <package>

If you choose option 1 your system should be able to locate the binary lessc. If you choose option 2 you should add ~/.npm/less/path_to_bin_directory to your path:

export PATH=~/.npm/less/path_to_bin_directory:$PATH

or better, if a ~/node_modules directory has been created as a result of installation:

export PATH=~/node_modules/less/path_to_bin_directory:$PATH