{"id":4821,"date":"2017-04-27T18:13:16","date_gmt":"2017-04-27T18:13:16","guid":{"rendered":"http:\/\/putridparrot.com\/blog\/?p=4821"},"modified":"2019-06-14T09:41:51","modified_gmt":"2019-06-14T09:41:51","slug":"npm-and-a-proxy-server","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/npm-and-a-proxy-server\/","title":{"rendered":"npm and a proxy server"},"content":{"rendered":"<p>I was just setting up npm to try out Angular and hit the age old problem of accessing the internet through a proxy server.<\/p>\n<p>You can set your proxy servers as follows<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nnpm config set proxy http:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt;\r\n<\/pre>\n<p>and likewise the https proxy as follows<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nnpm config set https-proxy http:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt;\r\n<\/pre>\n<p>This should create the relevant configuration file (.npmrc) in your c:\\Users\\{username} folder on Windows.<\/p>\n<p>To confirm the location you can simply type<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\nnpm config get\r\n<\/pre>\n<p><em>Note: type &#8220;npm config&#8221; to get a list of usage commands.<\/em><\/p>\n<p>You can also edit the .npmrc with a text editor, which is the simplest way to update password or the likes for your proxy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was just setting up npm to try out Angular and hit the age old problem of accessing the internet through a proxy server. You can set your proxy servers as follows npm config set proxy http:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt; and likewise the https proxy as follows npm config set https-proxy http:\/\/&lt;username&gt;:&lt;password&gt;@&lt;proxy&gt;:&lt;port&gt; This should create the relevant configuration [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[171],"tags":[],"class_list":["post-4821","post","type-post","status-publish","format-standard","hentry","category-npm"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/4821","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=4821"}],"version-history":[{"count":5,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/4821\/revisions"}],"predecessor-version":[{"id":7189,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/4821\/revisions\/7189"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=4821"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=4821"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=4821"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}