{"id":5671,"date":"2017-02-15T10:05:31","date_gmt":"2017-02-15T02:05:31","guid":{"rendered":"https:\/\/sdeno.com\/?p=5671"},"modified":"2017-02-15T10:05:31","modified_gmt":"2017-02-15T02:05:31","slug":"nvm%e5%8d%b8%e8%bd%bd%e6%8c%87%e5%ae%9anode-js%e7%89%88%e6%9c%ac%e5%8f%b7","status":"publish","type":"post","link":"https:\/\/sdeno.com\/?p=5671","title":{"rendered":"nvm\u5378\u8f7d\u6307\u5b9anode.js\u7248\u672c\u53f7"},"content":{"rendered":"<p>nvm \u5220\u9664 \u79fb\u9664 node.js<\/p>\n<p>\u6b63\u5e38\u7528nvm\u5378\u8f7dnode.js\u7248\u672c\u53f7\u7684\u547d\u4ee4\u662f\uff1a<\/p>\n<pre>nvm uninstall 6.9.2<\/pre>\n<p>&nbsp;<\/p>\n<p>\u4f46\u662f\u9047\u5230\u4e86\u6743\u9650\u95ee\u9898\uff1a<\/p>\n<pre>file is not writable: $NVM_DIR\/versions\/node\/v6.9.2\/bin\/gulp\r\nCannot uninstall, incorrect permissions on installation folder.\r\nThis is usually caused by running `npm install -g` as root. Run the following commands as root to fix the permissions and then try again.\r\n\r\n chown -R xgllseo \"$NVM_DIR\/versions\/node\/v6.9.2\"\r\n chmod -R u+w \"$NVM_DIR\/versions\/node\/v6.9.2\"<\/pre>\n<p>\u5927\u610f\u662f\u8bf4\u6709\u4f7f\u7528\u8fc7root\u7528\u6237\u6267\u884cnpm install -g\u547d\u4ee4\uff0c\u5bfc\u81f4$NVM_DIR\/versions\/node\/v6.9.2\/bin\/npm\u8fd9\u4e2a\u76ee\u5f55\u6ca1\u6709\u5199\u6743\u9650\uff0c\u9700\u8981\u4fee\u6539\u76f8\u5e94\u76ee\u5f55\u7684\u6743\u9650\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u5c1d\u8bd5sudo\u5378\u8f7d<\/p>\n<p>\u6539\u6743\u9650\u592a\u9ebb\u70e6\u4e86\u4e9b\uff0c\u5c1d\u8bd5sudo\u7528root\u7528\u6237\u76f4\u63a5\u5378\u8f7d\u3002<\/p>\n<pre>$ sudo nvm uninstall 4.4.5\r\nsudo: nvm: command not found<\/pre>\n<p>&nbsp;<\/p>\n<p>\u4fee\u6539\u76ee\u5f55\u6743\u9650<\/p>\n<p>\u67e5\u4e0b $NVM_DIR\u8fd9\u4e2a\u53d8\u91cf\u6307\u5411\u90a3\u4e2a\u76ee\u5f55<\/p>\n<pre>$ echo $NVM_DIR\r\n\/Users\/xgllseo\/.nvm<\/pre>\n<p>\u5176\u5b9e\u53ea\u8981\u5b89\u88c5\u4e4b\u524d\u7ed9\u7684\u63d0\u793a\u505a\uff1a<\/p>\n<pre>sudo chown -R xgllseo \"$NVM_DIR\/versions\/node\/v6.9.2\"\r\nsudo chmod -R u+w \"$NVM_DIR\/versions\/node\/v6.9.2\"<\/pre>\n<p>\u518d\u6b21\u6267\u884c<\/p>\n<pre>nvm uninstall 6.9.2<\/pre>\n<p><a href=\"http:\/\/www.01happy.com\/nvm-uninstall-node-permission\/\" target=\"_blank\">http:\/\/www.01happy.com\/nvm-uninstall-node-permission\/<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>nvm \u5220\u9664 \u79fb\u9664 node.js \u6b63\u5e38\u7528nvm\u5378\u8f7dnode.js\u7248\u672c\u53f7\u7684\u547d\u4ee4\u662f\uff1a nvm uninstall [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42],"tags":[],"class_list":["post-5671","post","type-post","status-publish","format-standard","hentry","category-mac"],"_links":{"self":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/5671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5671"}],"version-history":[{"count":0,"href":"https:\/\/sdeno.com\/index.php?rest_route=\/wp\/v2\/posts\/5671\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdeno.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}