{"id":2437,"date":"2022-05-15T10:12:29","date_gmt":"2022-05-15T01:12:29","guid":{"rendered":"https:\/\/blog.wsd.sh\/?p=2437"},"modified":"2022-08-18T03:39:33","modified_gmt":"2022-08-17T18:39:33","slug":"nvm%e3%81%aeinstall","status":"publish","type":"post","link":"https:\/\/blog.wsd.sh\/?p=2437","title":{"rendered":"<small>nvm\u306einstall<\/small>"},"content":{"rendered":"<p>\uff11\uff0envm\u306einstall<\/p>\n<p>\uff12\uff0enode\u306e\u73fe\u5728\u306eversion<\/p>\n<pre>\r\n# node -v\r\nv18.1.0\r\n<\/pre>\n<p>\uff13\uff0envm\u306edownload<\/p>\n<pre>\r\n# curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.1\/install.sh | bash\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100 15037  100 15037    0     0  27540      0 --:--:-- --:--:-- --:--:-- 27489\r\n=> Downloading nvm from git to '\/root\/.nvm'\r\n=> Cloning into '\/root\/.nvm'...\r\nremote: Enumerating objects: 355, done.\r\nremote: Counting objects: 100% (355\/355), done.\r\nremote: Compressing objects: 100% (302\/302), done.\r\nremote: Total 355 (delta 39), reused 169 (delta 28), pack-reused 0\r\nReceiving objects: 100% (355\/355), 221.36 KiB | 3.07 MiB\/s, done.\r\nResolving deltas: 100% (39\/39), done.\r\n* (HEAD detached at FETCH_HEAD)\r\n  master\r\n=> Compressing and cleaning up git repository\r\n\r\n=> Appending nvm source string to \/root\/.bashrc\r\n=> Appending bash_completion source string to \/root\/.bashrc\r\n=> You currently have modules installed globally with `npm`. These will no\r\n=> longer be linked to the active version of Node when you install a new node\r\n=> with `nvm`; and they may (depending on how you construct your `$PATH`)\r\n=> override the binaries of modules installed with `nvm`:\r\n\r\n\/usr\/local\/lib\r\ntqq corepack@0.10.0\r\ntqq eslint@8.15.0\r\ntqq ganache@7.1.0\r\ntqq n@8.2.0\r\ntqq npm-upgrade@3.1.0\r\ntqq pm2@5.2.0\r\nmqq uuid@8.3.2\r\n=> If you wish to uninstall them at a later point (or re-install them under your\r\n=> `nvm` Nodes), you can remove them from the system Node as follows:\r\n\r\n     $ nvm use system\r\n     $ npm uninstall -g a_module\r\n\r\n=> Close and reopen your terminal to start using nvm or run the following to use it now:\r\n\r\nexport NVM_DIR=\"$HOME\/.nvm\"\r\n[ -s \"$NVM_DIR\/nvm.sh\" ] && \\. \"$NVM_DIR\/nvm.sh\"  # This loads nvm\r\n[ -s \"$NVM_DIR\/bash_completion\" ] && \\. \"$NVM_DIR\/bash_completion\"  # This loads nvm bash_completion\r\n#\r\n<\/pre>\n<p>\uff13\uff0e~\/.bashrc\u306b\u5909\u66f4\u304c\u52a0\u3048\u3089\u308c\u3066\u3044\u308b<br \/>\n\u3053\u3053\u3067\u3001node\u3078\u306epath\u3092\u5207\u308a\u66ff\u3048\u3066\u3044\u308b<\/p>\n<pre>\r\n# cat ~\/.bashrc\r\n# .\/bashrc\r\n\u30fb\u30fb\u30fb\r\nexport NVM_DIR=\"$HOME\/.nvm\"\r\n[ -s \"$NVM_DIR\/nvm.sh\" ] && \\. \"$NVM_DIR\/nvm.sh\"  # This loads nvm\r\n[ -s \"$NVM_DIR\/bash_completion\" ] && \\. \"$NVM_DIR\/bash_completion\"  # This loads nvm bash_completion\r\n\r\n# source ~\/.bashrc\r\n#\r\n<\/pre>\n<p>\uff14\uff0e\u53c2\u8003<br \/>\n<a href=\"https:\/\/github.com\/nvm-sh\/nvm\/blob\/master\/README.md\">https:\/\/github.com\/nvm-sh\/nvm\/blob\/master\/README.md<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uff11\uff0envm\u306einstall \uff12\uff0enode\u306e\u73fe\u5728\u306eversion # node -v v18.1.0 \uff13\uff0envm\u306edownload # curl -o- https:\/\/raw.githubusercontent.com\/&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/2437"}],"collection":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2437"}],"version-history":[{"count":11,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/2437\/revisions"}],"predecessor-version":[{"id":3318,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=\/wp\/v2\/posts\/2437\/revisions\/3318"}],"wp:attachment":[{"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wsd.sh\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}