Install Nodejs under Window

Source: Internet
Author: User

Nodejs+npm+bower installation configuration steps in the Windows environment2014-07-23 Pavilion + pay attention to Flowers (0)   Nodejs+npm+bower installation configuration steps in Windows environment   See the News Network > look engine > Open source Products   posted 3 hours ago (2014-04-07 11:57)   Reading (7)  |  Comments (0)  0 People collection This article,  0 windows under the Nodejs installation is more convenient (v0.6.0 version, support Windows native), only need to login official website (http://nodejs.org /), you can see the "Install" button on the homepage, and a direct click will automatically download the installation. The installation process is basically direct "NEXT" on it. (The installation MSI file for Windows will add the system variable of path directly in the process, the variable value is your installation path, for example "C:\Program Files\nodejs", my demo here is installed in "D:\Program Files\nodejs")   Needless to say, after the installation is complete, we first detect if the Nodejs is installed successfully, cmd command line type: node -v  If the version prompt appears, the installation is successful, such as:   NPM installation. Since NPM has been integrated with the new version of Nodejs, NPM has been installed as well. You can also use the cmd command line to type: npm -v  Similarly, if the version prompt appears, the installation is successful, such as:  , the regular nodejs has been built so far has been completed, Can't wait. You can type "node" into node development mode on the cmd command line, enter your Nodejs first sentence: "Hello World" – Enter: Console.log (' Hello World '). There are no more demonstrations here.  NPM as a Nodejs module management, I did not look at the data in a systematic way, which led to the installation of the configuration module when a large detour, so now it is necessary to list to record. We will first configure the NPM Global Module storage path and the cache path, for example, I would like to put the above two folders in the Nodejs home directory, the Nodejs under the establishment of "Node_global" and "Node_cache" two folder. We'll just type two lines of command in cmd: npm config set prefix  "D:\program files\nodEjs\node_global "  and  npm config set cache " D:\program files\nodejs\node_cache "  Please note that because I have previously dropped Nodejs installed in the" D:\Program Files\nodejs "directory, so when you type the command, please enter your Nodejs directory correctly.   Now let's try to install a module and choose Express, the more common module. Also in the cmd command line, input: npm install express -g  Note, here "-g" This parameter means to be loaded into the global directory, which is said to set the "D:\ Program Files\nodejs\node_global "inside. After the installation process in the CMD is finished scrolling, it will prompt "express" where it is installed, the version and its directory structure.   The next step is critical, and we need to set up system variables. Go to my Computer → properties → advanced → environment variables. Under System variables, create a new "Node_path" and enter "C:\Program files\nodejs\node_global\node_modules". As shown in:   if the above steps are OK, we can open the cmd command line again, type: node  to appear ">" After the mark, type:  require (' Express ')   The purpose is to test if node's global path to the module is configured correctly. The correct CMD will list information about the Express. If the:   error is generally node_path configuration is incorrect, you can check again to make sure it is correct.   OK, now that we've installed the NODEJS+NPM, we're going to have a much easier time installing bower, just type one line of command in CMD:  npm install bower -g   Detect if the installation succeeds in the same way as Express.   Conclusion:  above is I in the installation configuration Nodejs when the operation, because of the novice's sake, with the help of Google consulted a lot of information, I hope that the first contact with Nodejs friends are a bit helpful. The IDE I'm using now is sublime text 2 + Nodejs plug-in this combination, can be in the sublime directly compiled node program, very convenient. Nodejs+npm+bower installation configuration steps in  windows environment   See News Network > Look engine > Open source Products   posted 3 hours ago (2014-04-07 11:57)   Reading (7)  |   Reviews (0)  0 People collection This article,  0 windows under the Nodejs installation is more convenient (v0.6.0 version, support Windows native), only need to login official website (HTTP/ nodejs.org/), you can see the "Install" button on the homepage, and the direct click will automatically download the installation. The installation process is basically direct "NEXT" on it. (The installation MSI file for Windows will add the system variable of path directly in the process, the variable value is your installation path, for example "C:\Program Files\nodejs", my demo here is installed in "D:\Program Files\nodejs")   Needless to say, after the installation is complete, we first detect if the Nodejs is installed successfully, cmd command line type: node -v  If the version prompt appears, the installation is successful, such as:   NPM installation. Since NPM has been integrated with the new version of Nodejs, NPM has been installed as well. You can also use the cmd command line to type: npm -v  Similarly, if the version prompt appears, the installation is successful, such as:  , the regular nodejs has been built so far has been completed, Can't wait. You can type "node" into node development mode on the cmd command line, enter your Nodejs first sentence: "Hello World" – Enter: Console.log (' Hello World '). There are no more demonstrations here.  NPM as a Nodejs module management, I did not look at the data in a systematic way, which led to the installation of the configuration module when a large detour, so now it is necessary to list to record. We will first configure the NPM Global Module storage path and the cache path, for example, I would like to put the above two folders in the Nodejs home directory, the Nodejs under the establishment of "Node_global" and "Node_cache" two folder. We'll just type two lines of command in CMD:  NPM CONFIG SET&Nbsp;prefix  "D:\program files\nodejs\node_global"   and  npm config set cache   "D:\program files\nodejs\node_cache"   Please note, because I have Nodejs installed in the "D:\Program Files\nodejs" directory, So please enter your Nodejs directory correctly when you type the command.   Now let's try to install a module and choose Express, the more common module. Also in the cmd command line, input: npm install express -g  Note, here "-g" This parameter means to be loaded into the global directory, which is said to set the "D:\ Program Files\nodejs\node_global "inside. After the installation process in the CMD is finished scrolling, it will prompt "express" where it is installed, the version and its directory structure.   The next step is critical, and we need to set up system variables. Go to my Computer → properties → advanced → environment variables. Under System variables, create a new "Node_path" and enter "C:\Program files\nodejs\node_global\node_modules". As shown in:   if the above steps are OK, we can open the cmd command line again, type: node  to appear ">" After the mark, type:  require (' Express ')   The purpose is to test if node's global path to the module is configured correctly. The correct CMD will list information about the Express. If the:   error is generally node_path configuration is incorrect, you can check again to make sure it is correct.   OK, now that we've installed the NODEJS+NPM, we're going to have a much easier time installing bower, just type one line of command in CMD:  npm install bower -g   Detect if the installation succeeds in the same way as Express.   Conclusion:  above is I in the installation configuration Nodejs when the operation, because of the novice's sake, with the help of Google consulted a lot of information, I hope that the first contact nodeJS friends are a bit of help. I now use the IDE is sublime Text 2 + Nodejs plug-in this combination, can be in the sublime directly compiled node program, very convenient. From:Tian Hao Hall > "BOOTSTARTP"

Install Nodejs under Window

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.