Nodejs NPM Install proxy settings

Source: Internet
Author: User

About Nodejs How to install I will not list, online more is a tutorial.

General network environment, if we want to install express.js these, only need to execute NPM install Express, but when everyone in a proxy Internet environment, this error. How to do the NPM command proxy settings, is the next I focus on, but also I personally practiced.

To solve the proxy problem, you might find 1 similar descriptions, add settings under the C:\users\ account name \.NPMRC This file, and when you enter this directory, there is no . NPMRC file, then you try to create a new one, But you are prompted to type the file name of the headache problem.


Here I'll talk about 1 settings in the Windows environment, where we use the following command in the Node command line window:

NPM Config set https-proxy=http://username: password @ agent host/
NPM config set proxy=/HTTP User name: password @ Agent host/


Then you will find the C:\users\ account name \ This directory artifact has appeared . NPMRC this file, here, you might think you're done, can't wait to try, in the node command line window input NPM Install Express -G This command, suddenly found out the inexplicable error, careful you can capture the registry.npmjs.org such words, Baidu discovered is a XX address.

It's okay, let's go ahead and set

NPM Config setregistry=http://registry.npmjs.org/

here, should solve your NPM agent problem, hope to help you.





Nodejs NPM Install proxy settings

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.