
{"id":2099,"date":"2016-10-05T18:50:59","date_gmt":"2016-10-05T22:50:59","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=2099"},"modified":"2016-10-05T18:50:59","modified_gmt":"2016-10-05T22:50:59","slug":"if-npm-tries-to-install-into-cprogram-files","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=2099","title":{"rendered":"If npm tries to install into C:\\Program Files"},"content":{"rendered":"<p>After some uprade (VS 2015 update 3 install?) <code>npm<\/code> started to install packages into <code>C:\\Program Files\\nodejs\\node_modules<\/code>, thus requirement admin rights and generally wrecking havoc. Previous installation location was<br \/>\n<code>%appdata%\/npm\/node_modules<\/code>.<\/p>\n<p><a href=\"https:\/\/github.com\/npm\/npm\/issues\/8980\">Npm people claim that this should never happen<\/a>, while other people claim this happens like all the time. Long story short, this can be overridden by placing an <code>.npmrc<\/code> file in your home folder (<code>C:\\users\\{username}<\/code>) that says<\/p>\n<p><code>prefix=C:\\Users\\{user_name_here}\\AppData\\Roaming\\npm<\/code><\/p>\n<p>Chances are your package store became corrupted (mine did), so run <code>npm update<\/code> after you change the prefix.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After some uprade (VS 2015 update 3 install?) npm started to install packages into C:\\Program Files\\nodejs\\node_modules, thus requirement admin rights and generally wrecking havoc. Previous installation location was %appdata%\/npm\/node_modules. Npm <a href=\"https:\/\/ikriv.com\/blog\/?p=2099\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[1],"tags":[],"class_list":["entry","author-ikriv","post-2099","post","type-post","status-publish","format-standard","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2099"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2099\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}