{"id":51,"date":"2021-01-14T16:32:48","date_gmt":"2021-01-14T08:32:48","guid":{"rendered":"https:\/\/similiaotian.com\/?p=51"},"modified":"2021-01-14T16:32:48","modified_gmt":"2021-01-14T08:32:48","slug":"node%e7%b3%bb%e5%88%97-%e5%ae%89%e8%a3%85nvm","status":"publish","type":"post","link":"https:\/\/99.feige5.com\/?p=51","title":{"rendered":"node\u7cfb\u5217-\u5b89\u88c5nvm"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u5f15\u8a00<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>nvm\u7684\u597d\u5904\u662f\u65b9\u4fbf\u7ba1\u7406node\u7684\u7248\u672c\uff0c\u53ef\u4ee5\u591a\u7248\u672c\u5e76\u5b58\u3002<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">1. \u51c6\u5907\u5de5\u4f5c<\/h2>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>\u5b89\u88c5\u524d\u5378\u8f7d\u5b8c\u5168node<\/p><\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u5b89\u88c5<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/github.com\/nvm-sh\/nvm\" target=\"_blank\" rel=\"noreferrer noopener\">github\u94fe\u63a5<\/a><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e00\u79cd<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.34.0\/install.sh | bash\n\u590d\u5236\u4ee3\u7801<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b2c\u4e8c\u79cd<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -qO- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.34.0\/install.sh | bash\n\u590d\u5236\u4ee3\u7801<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u73af\u5883\u53d8\u91cf<\/h3>\n\n\n\n<p>The script clones the nvm repository to <code>~\/.nvm<\/code> and adds the source line to your profile (<code>~\/.bash_profile<\/code>, <code>~\/.zshrc<\/code>, <code>~\/.profile<\/code>, or<code>~\/.bashrc<\/code>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>export NVM_DIR=\"$HOME\/.nvm\"\n&#91; -s \"$NVM_DIR\/nvm.sh\" ] &amp;&amp; \\. \"$NVM_DIR\/nvm.sh\"  # This loads nvm\n&#91; -s \"$NVM_DIR\/bash_completion\" ] &amp;&amp; \\. \"$NVM_DIR\/bash_completion\"  # This loads nvm bash_completion\n\u590d\u5236\u4ee3\u7801<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">mac<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>brew install nvm<\/li><li>\u73af\u5883\u53d8\u91cf <code># add nvm export NVM_DIR=\"$HOME\/.nvm\" [ -s \"\/usr\/local\/opt\/nvm\/nvm.sh\" ] &amp;&amp; . \"\/usr\/local\/opt\/nvm\/nvm.sh\" # This loads nvm [ -s \"\/usr\/local\/opt\/nvm\/etc\/bash_completion\" ] &amp;&amp; . \"\/usr\/local\/opt\/nvm\/etc\/bash_completion\" # This loads nvm bash_completion \u590d\u5236\u4ee3\u7801<\/code><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">windows<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/www.jianshu.com\/p\/0d591ad6d60d\" target=\"_blank\" rel=\"noreferrer noopener\">\u53c2\u8003\u94fe\u63a5<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">3. \u5e38\u7528\u547d\u4ee4<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>\u67e5\u770b\u53ef\u5b89\u88c5\u7684node\u7248\u672c <code>nvm ls-remote<\/code><\/li><li>\u67e5\u770b\u5df2\u7ecf\u5b89\u88c5\u7684node\u7248\u672c <code>nvm ls<\/code><\/li><li>\u5b89\u88c5\u5176\u4ed6\u7248\u672cnode <code>nvm install 8.9<\/code><\/li><li>\u67e5\u770b\u5f53\u524d\u4f7f\u7528node\u7248\u672c <code>node --version<\/code><\/li><li>\u5207\u6362\u4f7f\u7528node\u7248\u672c <code>nvm use 8.9.4<\/code><\/li><li>\u5378\u8f7d\u67d0\u4e2a\u7248\u672cnode <code>nvm uninstall 0.11<\/code><\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f15\u8a00 nvm\u7684\u597d\u5904\u662f\u65b9\u4fbf\u7ba1\u7406node\u7684\u7248\u672c\uff0c\u53ef\u4ee5\u591a\u7248\u672c\u5e76\u5b58\u3002 1. \u51c6\u5907\u5de5\u4f5c \u5b89\u88c5\u524d\u5378\u8f7d\u5b8c\u5168node&hellip; <a href=\"https:\/\/99.feige5.com\/?p=51\" class=\"more-link read-more\" rel=\"bookmark\">\u7ee7\u7eed\u9605\u8bfb <span class=\"screen-reader-text\">node\u7cfb\u5217-\u5b89\u88c5nvm<\/span><i class=\"fa fa-arrow-right\"><\/i><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":{"0":"post-51","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-uncategorized","7":"h-entry","9":"h-as-article"},"_links":{"self":[{"href":"https:\/\/99.feige5.com\/index.php?rest_route=\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/99.feige5.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/99.feige5.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/99.feige5.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/99.feige5.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=51"}],"version-history":[{"count":0,"href":"https:\/\/99.feige5.com\/index.php?rest_route=\/wp\/v2\/posts\/51\/revisions"}],"wp:attachment":[{"href":"https:\/\/99.feige5.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/99.feige5.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/99.feige5.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}