Install Nodejs under Windows7 x64 system and build less environment under Webstorm 9.0.1

Source: Internet
Author: User

1, open Nodejs official website http://www.nodejs.org/, point "DOWNLOADS", point 64-bit Download "Node-v0.10.33-x64.msi".

2. After downloading, double click "Node-v0.10.33-x64.msi" and install Nodejs by default, the default installation path is: C:\Program Files\nodejs.

3, "Start"-->cmd, open cmd program, enter "Node-v", appear "v0.10.33"; Enter "Npm-v" and "1.4.28" appears, stating that both Nodejs and NPM have been successfully installed.

4, enter C:\Program Files\nodejs, double-click Run "Npm.cmd", you will find it flashed, caught the error message as follows:

Online Search Many people will appear this error! The workaround is as follows: Enter the C:\Users\wind\AppData\Roaming directory, create a new folder "NPM" (Special note: AppData is a hidden folder, to set the folder view property to "Show hidden files, folders and drives" is visible).

5, enter C:\Program Files\nodejs again, double-click Run "Npm.cmd", capture the information as follows:

6, "Start"-->cmd, open the CMD program, enter "CD C:\Program Files\nodejs", enter the Nodejs installation directory. Enter NPM install less Enter to install the less component. When you are done, you will find that there is no less component in the C:\Program files\nodejs\node_modules\npm\node_modules directory.

For a long time reason, originally it in the C:\Users\wind\AppData\Roaming\npm-cache directory.

7, "Start"-->cmd, open the CMD program, enter "CD C:\USERS\WIND\APPDATA\ROAMING\NPM" and enter the directory, entered "NPM install less" carriage return. Wait a moment, and the less component will be installed in the "Node_modules" folder in that directory.

At this point Windows7 x64 system installation Nodejs and configuration less components have been basically completed, next we configure Webstorm 9.0.1, so that it can compile less files into a CSS file.

8, open the JetBrains webstorm 9.0.1 program, opened the "Superdesigns" project, the project contains "default.less" file.

9, File-->settings, open the settings option. Locate the "External Tools" extension tool settings Item, click "+" on the right, enter "less" in the Name field, and "Tool settings" respectively, enter as follows:

Program:c:\program files\nodejs\ Node.exe

PARAMETERS:C:\USERS\WIND\APPDATA\ROAMING\NPM\NODE_MODULES\LESS\BIN\LESSC $FilePath $ $FileDir $\$ Filenamewithoutextension$.css

Working Directiry:c:\program Files\nodejs

Confirm the "OK" button at the bottom right after the input is correct. Then click on the "Apply" button at the bottom right of the settings version to apply.

10, enter "key" at the top of the settings panel, find the shortcut key set "Keymap", find "External Tools" point on the right, click "Less" and right button, select "Add Keyboard Shortcut", in the appearance of its panel " First Stroke Press the ALT+B key at the same time so that "alt+b" is set to the shortcut key for compiling the less file into a CSS file. Of course, you can set the other shortcut keys according to your own situation. Confirm the "OK" button at the bottom right of the settings panel.

11, back to open the Default.less file, press "alt+b" shortcut key, see "Default.css" is not generated!

The less file has been successfully compiled into a CSS file.

Install Nodejs under Windows7 x64 system and build less environment under Webstorm 9.0.1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.