B
B
Belka20072014-03-06 23:52:15
css
Belka2007, 2014-03-06 23:52:15

How to fix error when using File Watchers in PhpStorm, LESS + YUI Compressor?

What it was installed on: Windows 7 64 bit, phpStrom 7.1.3
I configured phpStorm to automatically compile LESS to CSS, like this:
1. Installing NODE.JS in C:\Program Files\nodejs
2. Installing the LESS compiler (npm install -g less)
3. PhpStorm > Plugins > enable "LESS support"
4. PhpStorm > File Watchers > Add "LESS"
5. Options are:
fd9a71f7c1b541c6821b549a0d2bc9f8.png
Everything works fine.
But then I also wanted to set up YUI Compressor to automatically compress CSS, so I set it up:
1. Installing the LESS compiler (npm install -g yuicompressor)
2. PhpStorm > File Watchers > Add "YUI Compressor CSS"
4. The parameters are as follows:
264a2c3f2de1472b8f12a0495a54c4a3.png
When writing the file "my.less", the file "my.css" is created, but the file "my.min.css" is not created and the following error is written in the console:

C:/Users/USR3/AppData/Roaming/npm/yuicompressor.cmd my.css -o my.min.css
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn ENOENT
at errnoException (child_process.js:988:11)
at Process.ChildProcess._handle.onexit (child_process.js:779:34)

How to fix?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Pavel Myshkin, 2014-06-25
@Belka2007

I'm using the LESS CSS Compiler plugin , it works great.

G
garinich, 2014-04-23
@garinich

You need to write the path to java.exe in PATH.

R
rishanechka, 2016-09-13
@rishanechka

aafb1498933d40b99b297ee062815235.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question