K
K
Ken Jee2015-09-10 19:52:16
phpstorm
Ken Jee, 2015-09-10 19:52:16

How to configure LESS in PhpShtorm?

PhpShtorm when trying to compile from a LESS CSS file gives an error message:

The selected LESS file does not have any CSS output directories mapped to it and cannot be compiled.
You can add CSS output directories under Settings > Project Settings > LESS Compiler.

In PhpShtorm 9 there is no Project Settings item in File > Settings at all. The operating system under which this action is carried out is Windows 8.1. Someone faced a similar problem?
1) After installing the plugin (via File > Settings > Plugins > Browse Repositories), opening the less file, we see a request to add a watcher
2aff394d15e44615882c6d8c1b7fee41.jpg
2) Setting up the File Watcher
737fb550640c4976a4bc786857783f8e.jpg
3) Attempt to compile
7338ed4e3c4e427a95c4a56fefc45ab9.jpg
4) Error
3bfb0b107fda40fbaf2f02ec9b8d59ca.jpg
5) Here is the plugin that is used - LESS CSS Compiler
7f4bfd807dbf4e95b9621d441e163139.jpg

Answer the question

In order to leave comments, you need to log in

3 answer(s)
H
Hazrat Hajikerimov, 2015-09-10
@hazratgs

Compiling LESS to CSS on the fly in phpStorm under Windows
1. Install Node.js
2. Install the LESS compiler by opening the Node.js console after installation and enter the command npm install -g less
3. Then open phpStorm, and open the *.less file, then click on Add watcher
4. Specify the path to the less compiler
5. optionally remove error output.
That's all.

V
Vyacheslav Ovchinnikov, 2015-09-11
@ova777

I personally don't use PHPStorm to compile less so as not to depend on the IDE.
If you have a php project, look into lessphp .

I
iks, 2015-12-03
@iks

Maybe you also have this setting here
5880716f028c4ae7b78599aa57596585.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question