{"id":2904,"date":"2019-09-20T16:57:36","date_gmt":"2019-09-20T21:57:36","guid":{"rendered":"http:\/\/bluegalaxy.info\/codewalk\/?p=2904"},"modified":"2019-09-20T17:52:57","modified_gmt":"2019-09-20T22:52:57","slug":"node-js-how-to-update-node-and-npm-to-the-latest-versions","status":"publish","type":"post","link":"https:\/\/bluegalaxy.info\/codewalk\/2019\/09\/20\/node-js-how-to-update-node-and-npm-to-the-latest-versions\/","title":{"rendered":"Node.js: How to update Node and NPM to the latest versions"},"content":{"rendered":"\n<p>You can check to see what versions of <code>Node<\/code> and <code>NPM<\/code> you have with these commands: <code>node -v<\/code> <code>npm -v<\/code>. For example:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-4.png\" alt=\"\" class=\"wp-image-2905\" width=\"184\" height=\"93\"\/><\/figure>\n\n\n\n<p>To update NPM, you can do that at the command line with this command: <br><code>npm install -g npm<\/code><\/p>\n\n\n\n<p>The output should look something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-6-1024x114.png\" alt=\"\" class=\"wp-image-2908\" width=\"824\" height=\"91\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-6-1024x114.png 1024w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-6-300x33.png 300w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-6-768x85.png 768w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-6-676x75.png 676w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-6.png 1213w\" sizes=\"auto, (max-width: 824px) 100vw, 824px\" \/><\/figure>\n\n\n\n<p>A good way to update <code>Node<\/code> is to use Chocolatey. To do this first check to see if you have Chocolatey installed on your machine by running this command at the command line: <code>cinst<\/code><\/p>\n\n\n\n<p>If it is installed, the next line will say the version number of Chocolatey. For example: <code>Chocolatey v0.10.8<\/code><\/p>\n\n\n\n<p>To update Node.js you will need to run an elevated Admin level command line. For example, you could use a regular Command Prompt but choose &#8220;Run as administrator&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-7.png\" alt=\"\" class=\"wp-image-2910\" width=\"338\" height=\"280\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-7.png 520w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-7-300x248.png 300w\" sizes=\"auto, (max-width: 338px) 100vw, 338px\" \/><\/figure>\n\n\n\n<p>Or you could open what I did for this article: &#8220;Administrator: Windows PowerShell&#8221;.<\/p>\n\n\n\n<p>With Chocolatey installation confirmed, you only need this command to update Node.js:<br><code>cinst nodejs<\/code><\/p>\n\n\n\n<p>Output will look something like this:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-8-920x1024.png\" alt=\"\" class=\"wp-image-2911\" width=\"640\" height=\"712\" srcset=\"https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-8.png 920w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-8-270x300.png 270w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-8-768x855.png 768w, https:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-8-676x752.png 676w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>Now check the versions again to confirm they are updated:<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/bluegalaxy.info\/codewalk\/wp-content\/uploads\/2019\/09\/image-9.png\" alt=\"\" class=\"wp-image-2912\" width=\"172\" height=\"88\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>You can check to see what versions of Node and NPM you have with these commands: node -v npm -v. For example: To update NPM, you can do that at the command line with this command: npm install -g npm The output should look something like this: A good way to update Node is to &hellip; <a href=\"https:\/\/bluegalaxy.info\/codewalk\/2019\/09\/20\/node-js-how-to-update-node-and-npm-to-the-latest-versions\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Node.js: How to update Node and NPM to the latest versions<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44,205],"tags":[207,58,91],"class_list":["post-2904","post","type-post","status-publish","format-standard","hentry","category-javascript-language","category-node-js","tag-chocolatey","tag-node-js","tag-npm"],"_links":{"self":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/2904","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/comments?post=2904"}],"version-history":[{"count":2,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/2904\/revisions"}],"predecessor-version":[{"id":2913,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/posts\/2904\/revisions\/2913"}],"wp:attachment":[{"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/media?parent=2904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/categories?post=2904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bluegalaxy.info\/codewalk\/wp-json\/wp\/v2\/tags?post=2904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}