Less Compiler on windows 10

 I used help from this link https://www.jetbrains.com/help/phpstorm/2017.1/compiling-sass-less-and-scss-to-css.html

 

Every thing works until i reach File watcher steps, where I have to specify less command, 

1. there is no lessc.cmd, I have a shell file lessc.

2. If i enter lessc path in the Program =, then I get error "3:17 PM An exception occurred while executing watcher 'Less'. Watcher has been disabled. Fix it.: Cannot run program "\AppData\Roaming\npm\node_modules\less\bin\lessc" (in directory "less"): CreateProcess error=193, %1 is not a valid Win32 application"

Is there something I'm missing?

 

 

0
3 comments
Avatar
Permanently deleted user

Ok, found the issue.

 

I was trying to add Less File watcher Manually, and referring the less compiler at the wrong place.

The correct path should be <npm.home>\lessc.cmd

For easy settings, Just delete the watcher and open a less file, PHPstorm will recommend setting up a watcher.

0

Hi there,

> 1. there is no lessc.cmd, I have a shell file lessc.

It is there (if installed globally): C:\Users\USERNAME\AppData\Roaming\npm\lessc.cmd

 

> 2. If i enter lessc path in the Program =, then I get error

The error is correct -- that "bin\lessc" file is not Windows executable file -- it's a node.js code. You have to point to lessc.cmd on Windows

0

Apparently you have found the answer yourself already. Good.

0

Please sign in to leave a comment.