Nodejs Install less (NPM mode)

Source: Internet
Author: User

Detailed below

First we go to download a https://nodejs.org/en/, all the way next, because the file is not big, directly on the C drive

Of course I personally do not recommend in the C-drive, you like on which disk on which disk

Go to cmd

Okay, we've already seen the version number of node and NPM.

This means we have successfully installed

If you don't see it, you need to execute CMD under Administrator privileges

Then you need to create a two folder

Enter in cmd

NPM config set prefix "C:\program Files\nodejs\node_global"

NPM config Set cache "C:\program Files\nodejs\node_cache"

That should be correct.

OK below, go to less Chinese web, we see how to install

In the installation of this item, we can see that the $ symbol does not have to be lost.

Enter NPM in cmd install-g Less, after a long wait, well, @[email protected]

, you have installed the

below to find out which folder our LESSC files are in

Look at the Node_global folder under the Nodejs of the C drive.

Then we're going to go inside this folder from CMD.

Okay, now it's in this folder.

Here is a conversion statement LESSC styles.less styles.css

The path of the path CSS file for the LESSC less file

Because my less file is inside my project, which is the path G:\html\project_html5\css

According to the format of the translated statement, enter the following

Look at the results

Well, it's been translated, and then you can use it directly.

If there is a problem, that is cmd you want to open with administrator privileges

In addition, there is a problem, when you go from other places without entering that folder when the LESSC compiled cmd will prompt the error,

Then you need to configure the environment variables:

Right-click on my Computer Properties advanced system settings environment variables (Advanced):

Add the path to your less file in path.

Nodejs Install less (NPM mode)

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.