{"id":4907,"date":"2023-07-22T09:25:02","date_gmt":"2023-07-22T09:25:02","guid":{"rendered":"https:\/\/arzhost.com\/blogs\/?p=4907"},"modified":"2023-10-04T14:38:16","modified_gmt":"2023-10-04T14:38:16","slug":"install-node-js-and-npm-on-windows","status":"publish","type":"post","link":"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/","title":{"rendered":"How to Install node.js and NPM on Windows?"},"content":{"rendered":"<p>How to Install node.js and NPM on Windows? Node.js is a run-time environment that comes with everything you need to run a <strong>JavaScript program<\/strong>. Before content is sent to a web browser, it is used to run programs on the server to render it.<\/p>\n<p>Node Package Manager, or <a href=\"https:\/\/www.npmjs.com\/\" target=\"_blank\" rel=\"noopener\">NPM<\/a>, is a tool and repository for creating and exchanging JavaScript code.<\/p>\n<p>This post will assist you in setting up Node.js, NPM, and other helpful Node.js commands on a Windows computer.<\/p>\n<ol>\n<li><code>A user profile with administrative rights (or the ability to download and install software)<\/code><\/li>\n<li><code>Either Windows PowerShell (Search &gt; PowerShell &gt; right-click &gt; run as administrator) OR the ability to use the Windows command line (Search &gt; cmd &gt; right-click &gt; run as administrator)<\/code><\/li>\n<\/ol>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_74 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#How_to_Install_nodejs_and_NPM_on_Windows_Step_by_Step\" >How to Install node.js and NPM on Windows Step by Step?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#Step_1_Get_the_Nodejs_installer\" >Step 1: Get the Node.js installer.<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#Step_2_Download_and_install_NPM_and_Nodejs\" >Step 2: Download and install NPM and Node.js<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#Step_3_Verify_Installation\" >Step 3: Verify Installation<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#How_to_Update_nodejs_and_NPM_on_Windows\" >How to Update node.js and NPM on Windows?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#Windows\" >Windows<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#Simple_Nodejs_Use\" >Simple Node.js Use<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/arzhost.com\/blogs\/install-node-js-and-npm-on-windows\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Install_nodejs_and_NPM_on_Windows_Step_by_Step\"><\/span><strong>How to Install node.js and NPM on Windows Step by Step?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_Get_the_Nodejs_installer\"><\/span><strong><u>Step 1: Get the Node.js installer.<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Go to https:\/\/nodejs.org\/en\/download\/ via a web browser. To get the most recent default version, use the Windows Installer option. Version 10.16.0-x64 was the most current version at the time this article was written. The NPM package manager is included in the Node.js installer.<\/p>\n<p><iframe title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/X-FPCwZFU_8\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_2_Download_and_install_NPM_and_Nodejs\"><\/span><strong><u>Step 2: Download and install NPM and Node.js<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ol>\n<li>Open the installer after it has finished downloading. Click the file after opening the downloads link in your browser. Alternatively, you can double-click the file by navigating to where you stored it to start it.<\/li>\n<li>Click Run when the system prompts you to run the program.<\/li>\n<li>After being welcomed, click Next to see the Node.js Setup Wizard.<\/li>\n<li>Examine the license agreement on the next screen. If you are ready to install the software and accept the terms, click Next.<\/li>\n<li>The installer will ask you where you want to install it. Click Next after selecting the default location unless you have a reason to install it elsewhere.<\/li>\n<li>You can choose which components to include or leave out of the installation using the wizard. Again, click Next to accept the settings unless you have a compelling need to change them.<\/li>\n<li>To launch the installer, click the Install option. Click Finish when it&#8217;s finished.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Verify_Installation\"><\/span><strong><u>Step 3: Verify Installation<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><u>Launch PowerShell or a command prompt and type the following:<\/u><\/p>\n<ul>\n<li><code>node -v<\/code><\/li>\n<\/ul>\n<p><u>The Node.js version that is currently installed on your machine ought to be visible. The same applies to NPM:<\/u><\/p>\n<ul>\n<li><code>npm \u2013v<\/code><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"How_to_Update_nodejs_and_NPM_on_Windows\"><\/span><strong>How to Update node.js and NPM on Windows?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Windows\"><\/span><strong><u>Windows<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Node.js can be removed from Windows&#8217; Control Panel.<\/p>\n<p><u>To do this:<\/u><\/p>\n<ol>\n<li><code>Select \"Start\" &gt; \"Settings\" (the gear icon), then \"Apps.\"<\/code><\/li>\n<li><code>Click to highlight Node.js after scrolling down to find it.<\/code><\/li>\n<li><code>Choose Uninstall. This starts the program uninstall wizard.<\/code><\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Simple_Nodejs_Use\"><\/span><strong><u>Simple Node.js Use<\/u><\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Node.js is a framework, thus it doesn&#8217;t function like a typical application. Instead, it translates the instructions you type. Make a Hello World script to test your new Node.js installation.<\/p>\n<p><u>1: Start by opening your preferred text editor:<\/u><\/p>\n<p><u>2: After that, paste the subsequent content into the text editor you just launched:<\/u><\/p>\n<p style=\"padding-left: 40px;\"><code>var http = require('http');<\/code><\/p>\n<p style=\"padding-left: 40px;\"><code>\u00a0http. create Server (function (req, res) <\/code>{<\/p>\n<p style=\"padding-left: 40px;\">\u00a0<code>\u00a0 res. write Head (200, {'Content-Type': 'text\/html'}<\/code>);<\/p>\n<p style=\"padding-left: 40px;\">\u00a0<code>\u00a0 res. end ('Hello World!'<\/code>);<\/p>\n<p style=\"padding-left: 40px;\"><code>\u00a0}). listen (8080)<\/code>;<\/p>\n<p><u>3: After saving the file, go away. Launch PowerShell and type the following commands:<\/u><\/p>\n<ul>\n<li><code>Users your username&gt; node<\/code><\/li>\n<li><code>js<\/code><\/li>\n<\/ul>\n<p>It will appear that nothing has changed. Your script is actually executing in the background. If Windows Defender displays a warning about permitting traffic, click Allow for the time being.<\/p>\n<p><u>4: After that, launch a browser and type the following into the address bar:<\/u><\/p>\n<ul>\n<li><code>http:\/\/localhost:8080<\/code><\/li>\n<\/ul>\n<p>You should see the words &#8220;Hello World&#8221; in the upper-left corner.<\/p>\n<p>Your computer is currently working as a server. The Hello World message will appear on any other computer that tries to access your system via port 8080.<\/p>\n<p>Switch back to PowerShell and hit Ctrl+C to end the program. The command prompt will appear once more on the computer. This window may be closed anytime you are prepared.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><strong>Conclusion<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"color: #000000;\"><strong>How to Install node.js and NPM on Windows?<\/strong> <\/span>Both the Node.js framework and the <strong>NPM package management<\/strong> should now be installable. Additionally, you&#8217;ve created your first JavaScript node.js program!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Install node.js and NPM on Windows? Node.js is a run-time environment that comes with everything you need to run a JavaScript program. Before content is sent to a web browser, it is used to run programs on the server to render it. Node Package Manager, or NPM, is a tool and repository for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6106,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[],"table_tags":[],"class_list":["post-4907","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-window"],"_links":{"self":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/4907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/comments?post=4907"}],"version-history":[{"count":4,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/4907\/revisions"}],"predecessor-version":[{"id":6105,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/posts\/4907\/revisions\/6105"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media\/6106"}],"wp:attachment":[{"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/media?parent=4907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/categories?post=4907"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/tags?post=4907"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/arzhost.com\/blogs\/wp-json\/wp\/v2\/table_tags?post=4907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}