{"id":4023,"date":"2023-06-18T16:51:35","date_gmt":"2023-06-18T08:51:35","guid":{"rendered":"http:\/\/gaigaiming.com\/?p=3980"},"modified":"2026-03-12T15:40:56","modified_gmt":"2026-03-12T07:40:56","slug":"mac%e5%ae%89%e8%a3%85nvm","status":"publish","type":"post","link":"https:\/\/www.gaigaiming.com\/index.php\/2023\/06\/18\/mac%e5%ae%89%e8%a3%85nvm\/","title":{"rendered":"mac\u5b89\u88c5nvm"},"content":{"rendered":"<p>\u4e4b\u524d\u7535\u8111\u88c5\u8fc7\u5404\u79cd\u73af\u5883\uff0c\u76f4\u63a5\u4e71\u4e86\u3002\u91cd\u65b0\u5378\u8f7dnode npm\u540e\u518d\u5b89\u88c5nvm\u3002\u4eb2\u6d4b\u53ef\u7528\uff0c\u7b80\u5355\u5feb\u901f<\/p>\n<p>1\u3001\u5378\u8f7dnode\u3001npm<\/p>\n<p>brew uninstall node<\/p>\n<p>2\u3001\u4ee5\u4e0a\u5378\u8f7d\u5b8c\u6210\u540e\uff0c\u7ee7\u7eed\u6e05\u7406<\/p>\n<p>which node<\/p>\n<p>\/\/\u53ef\u4ee5\u770b\u5230 \/usr\/local\/bin\/node<\/p>\n<p>which npm<\/p>\n<p>\/\/\u53ef\u4ee5\u770b\u5230 \/usr\/local\/lib\/node_modules\/<\/p>\n<p>\/\/\u5168\u90e8\u5220\u9664\uff0c\u901a\u8fc7\u4ee5\u4e0b\u4e24\u53e5<\/p>\n<p>sudo rm -rf \/usr\/local\/bin\/node<br \/>\nsudo rm -rf \/usr\/local\/lib\/node_modules\/<\/p>\n<pre>\/\/\u5220\u9664\u5168\u5c40node\u6a21\u5757\u6ce8\u518c\u7684\u8f6f\u94fe \ncd \/usr\/local\/bin &amp;&amp; ls -l | grep \"..\/lib\/node_modules\/\" | awk '{print $9}'| xargs sudo rm<\/pre>\n<p>3\u3001\u5b89\u88c5 nvm<\/p>\n<pre><code class=\"language-text\">curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.1\/install.sh | bash<\/code>\n\n4\u3001\u5173\u95ed\u91cd\u542f\u547d\u4ee4\u7a97\u53e3,\u9a8c\u8bc1nvm\u7248\u672c\nnvm --vesion<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u7535\u8111\u88c5\u8fc7\u5404\u79cd\u73af\u5883\uff0c\u76f4\u63a5\u4e71\u4e86\u3002\u91cd\u65b0\u5378\u8f7dnode npm\u540e\u518d\u5b89\u88c5nvm\u3002\u4eb2\u6d4b\u53ef\u7528\uff0c\u7b80\u5355\u5feb\u901f 1\u3001\u5378\u8f7dnode\u3001 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-4023","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts\/4023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/comments?post=4023"}],"version-history":[{"count":1,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts\/4023\/revisions"}],"predecessor-version":[{"id":4030,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/posts\/4023\/revisions\/4030"}],"wp:attachment":[{"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/media?parent=4023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/categories?post=4023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gaigaiming.com\/index.php\/wp-json\/wp\/v2\/tags?post=4023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}