How to install and run lessc on top of node.js and Windows?

to get lessc working you have to add

C:\Users\Me\AppData\Roaming\npm

to the path


In a console, run the following:

node C:\Users\Me\AppData\Roaming\npm\node_modules\less\bin\lessc style.less > style.css

style.less must be in the console's directory.


I guess you could add the bin folder in system properties -> advanced ->environment variables and append the whole path to the bin folder by edited the Path variable.


step 1: npm install less -g

step 2: npm i less --save-dev