1. Use NPM to install the Less compiler and check the NPM version, as shown in Figure 1
npm -V

2. To globally install the Less compiler and run NPM in PhpStorm, select File to open Settings, as shown in Figure 2

3. Click Node.js and NPM under “Languages & Frameworks”. On the opened Node.js and NPM page, the Packages area displays all Node.js related packages currently installed on your computer, whether globally or at the project level. less is installed, as shown in Figure 3

4. Create a File Watcher by selecting File to open Settings, as shown in Figure 2

5. Click “File Watchers” under the “Tools” node. The opened File Watchers page displays a list of File Watchers already configured in the project, as shown in Figure 4

6. Repeat step 3 and find that less is installed at the project level rather than globally, as shown in Figure 5

7. Run the installation from the command line in global mode. Type the following command at the command prompt using the Taobao NPM mirror, as shown in Figure 6
cnpm install -g less

8. Add this folder: C:\Users\Administrator\AppData\Roaming\npm\node_modules\less to the PATH variable, as shown in Figure 7

9. Repeat step 5 and specify the program folder: C:\Users\Administrator\AppData\Roaming\npm\lessc.cmd, as shown in Figure 8

10. Create a new style.less file, add some content, and it will automatically compile to generate a style.css file, as shown in Figure 9

