{"componentChunkName":"component---src-templates-posts-js","path":"/blogs/page/5","result":{"data":{"allContentfulPost":{"edges":[{"node":{"slug":"installing-nodejs-tutorial-windows","title":"Installing Node.js Tutorial: Windows","image":{"file":{"url":"//images.ctfassets.net/xmu5vdhtphau/2Znvdbgm4tqquT6w7uWdXa/8c486f23dddaefad8a54dbb0463919ee/17-min.jpg","fileName":"17-min.jpg"}},"bodyContent":{"childMarkdownRemark":{"html":"<p>This article was first published in <a href=\"https://nodesource.com/blog/installing-nodejs-tutorial-windows/\">NodeSource blog</a> on February 2017.</p>\n<hr>\n<p>As with any programming language, platform, or tool that doesn't come bundled with Windows, getting up and running with Node.js takes some initial setup before you can start hacking away. In my experience, though Node.js has a far better installation experience on Windows than virtually any other language, platform, or tool that I've tried to use - just run the installer, and you're good to go.</p>\n<p>In this quick tutorial, we'll take a look at how to get Node.js installed on Windows. Once we've completed the entirety of the tutorial, you'll be ready to take the next step with Node.js.</p>\n<p>This guide covers installing Node.js on the following versions of Windows: Windows 7, Windows 8, Windows 8.1, and Windows 10. These are the versions that are consistently tested and supported by the Node.js build process at the time of writing.</p>\n<h2>Step 0: The Quick Guide (TL;DR) to Get Node.js Installed on Windows</h2>\n<p>Here's the abbreviated guide, highlighting the major steps:</p>\n<ol>\n<li>Open the official page for <a href=\"https://nodejs.org/en/download/\">Node.js downloads</a> and download Node.js for Windows by clicking the \"Windows Installer\" option</li>\n<li>\n<p>Run the downloaded Node.js <code>.msi</code> Installer - including accepting the license, selecting the destination, and authenticating for the install.</p>\n<ul>\n<li>This requires Administrator privileges, and you may need to authenticate</li>\n</ul>\n</li>\n<li>To ensure Node.js has been installed, run <code>node -v</code> in your terminal - you should get something like <code>v6.9.5</code></li>\n<li>Update your version of npm with <code>npm install npm --global</code></li>\n<li>This requires Administrator privileges, and you may need to authenticate</li>\n<li>Congratulations - you've now got Node.js installed, and are ready to start building! </li>\n</ol>\n<h2>Step 1: Download the Node.js <code>.msi</code> Installer</h2>\n<p>As the first step to installing Node.js on Windows, you'll need to download the installer. You'll be able to grab the installer from the <a href=\"https://nodejs.org/en/download/\">official downloads page for Node.js</a>. </p>\n<p>You'll be able to download the Windows Node.js installer by clicking the <code>Windows Installer</code> option at the top of the page - when you click this, you'll get an MSI installer download. Make sure to save it somewhere that you'll be able to find it!</p>\n<h2>Step 2: Run the Node.js Installer</h2>\n<p>You've got the Windows Installer - great! Now, you need to install it on your PC. The installer is a pretty typical Wizard interface for installing software on Windows - there are a few steps to it, but you can have it done in under a minute. You can get through it by following the guide below:</p>\n<ul>\n<li>\n<p>Welcome to the Node.js Setup Wizard</p>\n<ul>\n<li>Select <code>Next</code></li>\n</ul>\n</li>\n<li>\n<p>End-User License Agreement (EULA)</p>\n<ul>\n<li>Check <code>I accept the terms in the License Agreement</code></li>\n<li>Select <code>Next</code></li>\n</ul>\n</li>\n<li>\n<p>Destination Folder</p>\n<ul>\n<li>Select <code>Next</code></li>\n</ul>\n</li>\n<li>\n<p>Custom Setup</p>\n<ul>\n<li>Select <code>Next</code></li>\n</ul>\n</li>\n<li>\n<p>Ready to install Node.js</p>\n<ul>\n<li>Select <code>Install</code></li>\n<li><em>Note:</em> This step requires Administrator privlidges.</li>\n<li>If prompted, authenticate as an Administrator</li>\n</ul>\n</li>\n<li>\n<p>Installing Node.js</p>\n<ul>\n<li>Let the installer run to completion</li>\n</ul>\n</li>\n<li>\n<p>Completed the Node.js Setup Wizard</p>\n<ul>\n<li>Click <code>Finish</code></li>\n</ul>\n</li>\n</ul>\n<h1>Step 3: Verify that Node.js was Properly installed</h1>\n<p>To double check that Node.js was installed fully on your PC, you can test the following command in your Command Prompt (regardless of if you're using <code>cmd.exe</code>, <code>Powershell</code>, or any other command prompt):</p>\n<pre><code class=\"language-plain\">$ node -v\n</code></pre>\n<p>If Node.js was installed fully, the command prompt will print something similar to (but probably not <em>exactly</em>) this:</p>\n<pre><code class=\"language-plain\">$ node -v // The command we ran - prints out the version of Node.js that's currently installed \nv6.9.5 // The printed version of Node.js that's currently installed - v6.9.5 was the most current LTS release at the time of writing.\n</code></pre>\n<h1>Step 4: Update the Local npm Version</h1>\n<p>As the final step in getting Node.js installed, we'll update your version of npm - the package manager that comes bundled with Node.js.</p>\n<p>Node.js always ships with a specific version of npm - Node.js doesn't (and shouldn't!) automatically update npm. The release cycle of the npm CLI client isn't in sync with the Node.js releases. Because of this, there's almost <em>certainly</em> going to be a newer version of npm available than the one that is installed as a default in any given Node release.</p>\n<p>To quickly and easily update <code>npm</code>, you can run the following command:</p>\n<pre><code class=\"language-plain\">npm install npm --global // Update the `npm` CLI client\n</code></pre>\n<h2>Step 5: Go build applications, APIs, tools, and more with Node.js!</h2>\n<p>Now you've got Node.js on Windows machine. It's time to start exploring!</p>\n<p>Luckily, we've got your back. We've written a bunch of articles to help you get started with Node.js! If you're interested in exploring ES6, you should check out our article on <a href=\"https://nodesource.com/blog/six-of-the-most-exciting-es6-features-in-node-js-v6-lts\">some of the most exciting ES6 features in Node.js</a>. If you're interested in ways to collaborate with your team a bit better, you should check out our tutorial on <a href=\"https://nodesource.com/blog/streamline-javascript-development-with-eslint\">using ESLint in projects to improve team collaboration through code standards</a>. Maybe you'd just like to start deploying the applications you're about to build? In that case, take a peek at our guide on <a href=\"https://nodesource.com/blog/running-your-node-js-app-with-systemd-part-1\">how to deploy Node.js apps on Linux with systemd</a>!</p>\n<p>That said, if you want to keep in touch with Node.js and the surrounding ecosystem, you should go follow <a href=\"http://twitter.com/nodesource\">@NodeSource</a> on Twitter! We'll keep you updated with important news from the Node.js project, and share the best Node.js tutorials, guides, and tools that the community has to offer.</p>"}},"categories":[{"name":"How To","slug":"how-to"},{"name":"Tutorials","slug":"tutorials"},{"name":"Node.js","slug":"node-js"}]}},{"node":{"slug":"installing-nodejs-tutorial-mac-os-x","title":"Installing Node.js Tutorial: macOS","image":{"file":{"url":"//images.ctfassets.net/xmu5vdhtphau/4Gb9yXc2CqRxOqGWgD4ulE/094c2774f665db490913466ff5cb5262/16-min.png","fileName":"16-min.png"}},"bodyContent":{"childMarkdownRemark":{"html":"<p>Just like any programming language, platform, or library, getting up and running with Node.js takes some initial setup before you can start hacking away. With Node.js, the only initial setup required is, quite simply, getting the binary installed.</p>\n<p>In this quick tutorial, we'll take a quick look at how to get Node.js on macOS. Once we've completed the entirety of the tutorial, you'll be ready to take the next step with Node.js.</p>\n<p>This guide covers installing Node.js on the following versions of OS X and macOS: OS X 10.10 (Yosemite), OS X 10.11 (El Capitan), and macOS 10.11. These are the versions that are consistently tested and supported by the Node.js build process at the time of writing.</p>\n<h2>Step 0: The Quick Guide (TL;DR) to Get Node.js Installed on macOS</h2>\n<p>Here's the abbreviated guide, highlighting the major steps:</p>\n<ol>\n<li>Go to the <a href=\"https://nodejs.org/en/download/\">Node.js Downloads page</a></li>\n<li>Download Node.js for macOS by clicking the \"Macintosh Installer\" option</li>\n<li>Run the downloaded Node.js <code>.pkg</code> Installer</li>\n<li>Run the installer, including accepting the license, selecting the destination, and authenticating for the install.</li>\n<li>You're finished! To ensure Node.js has been installed, run <code>node -v</code> in your terminal - you should get something like <code>v6.9.4</code></li>\n</ol>\n<h2>Step 1: Download the Node.js <code>.pkg</code> Installer</h2>\n<p>As our first step, we need to actually <em>get</em> the official installer for Node.js on macOS. To do so, we can head over to the <a href=\"https://nodejs.org/en/download/\">Node.js Downloads page</a> to download the installer. </p>\n<p>You can get the macOS installer by clicking the <code>Macintosh Installer</code> option - this will download the <code>.pkg</code> installer for Node.js. Make sure you save it somewhere that you'll be able to access it!</p>\n<h2>Step 2: Run the Node.js Installer</h2>\n<p>Now that you've got the installer downloaded, you'll need to run it. The installer is a pretty typical interface - it won't take long to get through it (under a minute), even though there are a few parts to it. You can get through it by following the guide below:</p>\n<ul>\n<li>\n<p>Introduction</p>\n<ul>\n<li>Select <code>Continue</code></li>\n</ul>\n</li>\n<li>\n<p>License</p>\n<ul>\n<li>Select <code>Continue</code></li>\n<li>Select <code>Agree</code></li>\n</ul>\n</li>\n<li>\n<p>Installation Type</p>\n<ul>\n<li>Select <code>Install</code></li>\n<li>Authenticate with your Mac to allow the Installation</li>\n<li>Select <code>Install Software</code></li>\n</ul>\n</li>\n<li>\n<p>Summary</p>\n<ul>\n<li>Select <code>Close</code></li>\n</ul>\n</li>\n</ul>\n<h1>Step 3: Verify that Node.js was Properly installed</h1>\n<p>To verify that Node.js was installed correctly on your Mac, you can run the following command in your terminal:</p>\n<pre><code>$ node -v\n</code></pre>\n<p>If Node.js was properly installed, you'll see something close to (but probably not <em>exactly</em>) this:</p>\n<pre><code>$ node -v // The command we ran - tests the version of Node.js that's currently installed \nv6.9.4 // The version of Node.js that's installed - v6.9.4 was the most current LTS release at the time of writing.\n</code></pre>\n<h1>Step 4: Update Your npm Version</h1>\n<p>As one last step for good measure, we'll update your version of npm.</p>\n<p>Node.js always ships with a specific version of npm - Node.js doesn't (and shouldn't!) automatically update npm. The npm releases aren't synced with Node.js releases. Because of this, there's almost <em>always</em> a newer version of npm than the one that is installed by default with a given version of Node.</p>\n<p>To easily update your version of <code>npm</code>, you can run the following command:</p>\n<pre><code>$ sudo npm install npm --global // Update the `npm` CLI client\n</code></pre>\n<h2>Step 6: Start building with Node.js!</h2>\n<p>Now you've got Node.js on your Mac. It's time to start exploring!</p>\n<p>Thankfully, we've got your back. We've got a ton of articles on getting started with Node.js! If you're interested in exploring ES6, you should check out our article on <a href=\"https://nodesource.com/blog/six-of-the-most-exciting-es6-features-in-node-js-v6-lts\">some of the most exciting ES6 features in Node.js</a>. Looking for ways to standardize your JavaScript code across your team? In that case, you should check out our guide to <a href=\"https://nodesource.com/blog/streamline-javascript-development-with-eslint\">using ESLint to build code standards in Node.js applications</a>. Maybe you'd just like to start deploying your applications? In that case, check out our guide on <a href=\"https://nodesource.com/blog/running-your-node-js-app-with-systemd-part-1\">deploying Node.js apps with systemd</a>!</p>\n<p>That said, if you want to keep in touch with Node.js and the surrounding ecosystem, you should go follow <a href=\"http://twitter.com/nodesource\">@NodeSource</a> on Twitter! We'll keep you updated with important news from the Node.js project, and share the best Node.js tutorials, guides, and tools that the community has to offer!</p>"}},"categories":[{"name":"Node.js","slug":"node-js"},{"name":"How To","slug":"how-to"},{"name":"Tutorials","slug":"tutorials"}]}},{"node":{"slug":"installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu","title":"Installing Node.js Tutorial: Using nvm","image":{"file":{"url":"//images.ctfassets.net/xmu5vdhtphau/1p4eEtLFdGcVSekU5ZnCTi/7544a13de1bae997de913ce0609374eb/15-min.png","fileName":"15-min.png"}},"bodyContent":{"childMarkdownRemark":{"html":"<p>This article was first published in <a href=\"https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/\">NodeSource blog</a> on January 2017.</p>\n<p>As with any programming language, platform, or tool, the first step to using it is getting it installed. Many of them typically come with a speedy way to upgrade when a new version is available. </p>\n<p>By default, there's not a way to upgrade the version of Node.js you've got from within Node.js itself. That said, there's a fantastic tool for the community called <a href=\"https://github.com/creationix/nvm\">nvm</a> that allows you to manage the versions of Node.js that you've got installed locally. </p>\n<p>One awesome aspect of <code>nvm</code> is that it <em>manages</em> the versions of Node.js, it doesn't just upgrade them. This means you can have the latest version of Node.js, the latest versions of all the LTS release lines, and any number of other versions you want to use or test as well.</p>\n<p>In this quick tutorial, we'll take a look at how to install nvm, and then how to start using it as your version manager for Node.js. Once we've completed the tutorial, you'll be ready to take the next step with Node.js.</p>\n<p>This guide covers installing nvm on macOS and Linux - note that all versions of Node.js may not support <em>every</em> version of macOS or Linux.  </p>\n<h2>Step 0: The Quick Guide (TL;DR) to Get Node.js Installed using nvm</h2>\n<p>Here's the abbreviated guide, highlighting the major steps:</p>\n<ul>\n<li>\n<p>Download the nvm install script via cURL: </p>\n<ul>\n<li><code>curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash</code></li>\n</ul>\n</li>\n<li>Ensure that nvm was installed correctly with <code>nvm --version</code>, which should return the version of nvm installed.</li>\n<li>\n<p>Install the version of Node.js you want</p>\n<ul>\n<li>Install the latest version with <code>nvm install node</code></li>\n<li>Use the latest version with <code>nvm use node</code></li>\n<li>Install the latest LTS version with <code>nvm install --lts</code></li>\n<li>Use the latest LTS verison with <code>nvm use --lts</code></li>\n</ul>\n</li>\n</ul>\n<h2>Step 1 (Optional): Ensure your system has the appropriate C++ compiler</h2>\n<p>In some cases, like when installing Node.js releases from their source or installing versions of Node.js <em>before</em> <code>0.8.6</code> (when the project started shipping binaries), you'll need to ensure that your system has the appropriate C++ build tools.</p>\n<p>For LTS and modern releases, you <strong>will not need this step</strong>. That said, it's a <em>nice to have</em> to ensure that the majority of requirements are met in any scenario.</p>\n<p>On <strong>macOS</strong>, you've got two options for a C++ compiler: the full XCode application or the stand-alone Command Line Tools portion of Xcode. </p>\n<p>To get these on macOS, you can follow these steps:</p>\n<ul>\n<li>Open your terminal of choice</li>\n<li>\n<p>Run <code>xcode-select --install</code> as a command</p>\n<ul>\n<li>A popup will appear</li>\n<li>Select <code>Install</code></li>\n</ul>\n</li>\n<li>Allow the download to run to completion</li>\n<li>If the installation went uninterrupted, you should have the necessary tools to use nvm! </li>\n</ul>\n<p>On <strong>Linux</strong>, the C++ compiler will vary from distribution to distribution. For example, on Debian and Ubuntu, you'll need to install <code>build-tools</code> and <code>libssl-dev</code>, but this may be different on your given Linux distribution.</p>\n<p>To get <code>build-tools</code> and <code>libssl-dev</code> on Debuan and Ubuntu distributions, you can run these commands:</p>\n<pre><code class=\"language-plain\">sudo apt-get install build-essential # Install the build-essential package - let this run to completion\n\nsudo apt-get install libssl-dev # Install the libssl-dev package - also let this one run to completion\n</code></pre>\n<h2>Step 2: Download nvm with the install script</h2>\n<p>Once you've got the right C++ compiler for your system, now it's time to run the nvm install script. Here are the single-step install scripts for both macOS and Linux. You've got the option of cURL or Wget but both achieve the same result. </p>\n<p><em>Note:</em> If your Linux system doesn't have either cURL or Wget, you can run <code>sudo apt-get install curl</code> and use the cURL method.</p>\n<h3>Running the Install Script with cURL:</h3>\n<p>To install nvm with the cURL method, run the following command in your terminal:</p>\n<pre><code class=\"language-plain\">curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash\n</code></pre>\n<h3>Using the Install Script with Wget:</h3>\n<p>To install nvm with the Wget method, run the following command in your terminal:</p>\n<pre><code class=\"language-plain\">wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash\n</code></pre>\n<h2>Step 3: Verify that nvm was Properly installed</h2>\n<p>After running the install script from Step 2, nvm should have successfully installed. To ensure that nvm is up and running on your machine, you can test it with the following command:</p>\n<pre><code class=\"language-plain\">nvm --version\n</code></pre>\n<p>This command will return something like (though not necessarily exactly) the following: </p>\n<pre><code class=\"language-plain\">nvm --version # The command we ran - it checks the currently installed version of nvm\n0.33.0 # The current version of nvm - yours may differ!\n</code></pre>\n<h3>Missing the <code>nvm</code> command after running the install script?</h3>\n<p>If you're using macOS, you may be missing a <code>.bash_profile</code> file - to troubleshoot this, you can run <code>touch ~/.bash_profile</code> in your command line and re-run the installer script.</p>\n<p>If the problem persists after that, you can open the existing <code>.bash_profile</code> file (using your favorite text editor) and add the following line to it:</p>\n<pre><code class=\"language-plain\">source ~/.bashrc\n</code></pre>\n<p>If you're still having issues, you can take a peek at <a href=\"https://github.com/creationix/nvm/issues/576\">this issue</a> to find a discussion of the problem and a collection of possible resolutions.</p>\n<h2>Step 3: Using nvm to manage Node.js</h2>\n<p>Congratulations! You've now got <code>nvm</code> - a tool to <em>easily</em> allow you to manage and swap out the versions of Node.js you've got installed locally. Now, let's get you started with doing just that.</p>\n<h3>Install the latest Node.js version</h3>\n<p>To install the latest available version of Node.js, you can use the following command: </p>\n<pre><code class=\"language-plain\">nvm install node\n</code></pre>\n<p>Next, to <em>use</em> that version of Node.js in any new shell, you can simply run the <code>use</code> command:</p>\n<pre><code class=\"language-plain\">nvm use node\n</code></pre>\n<h3>Install the latest Node.js LTS version</h3>\n<p>To install the latest available <em>LTS</em> version of Node.js, you can run the following command: </p>\n<pre><code class=\"language-plain\">nvm install --lts\n</code></pre>\n<p>And to use that latatestTS version of Node.js in any new shell, you can simply run the <code>use</code> command:</p>\n<pre><code class=\"language-plain\">nvm use --lts\n</code></pre>\n<h2>Step 6: Go build applications, APIs, tools, and more with Node.js!</h2>\n<p>Now you've got a fantastic version manager for Node.js. It's time to start building!</p>\n<div class=\"blog-cta nsolid\">\n\tGet unparalleled visibility into application performance and system health.\n  <a class=\"button more large\" href=\"https://accounts.nodesource.com/sign-up-blogref/?utm_campaign=blogref&utm_source=blog&utm_content=blog-install-nvm\">Get started with N|Solid today</a>\n</div>\n<p>We've got some resources to get you kickstarted! Both the breadth and depth of the Node.js and the JavaScript ecosystems are quite large - in addition to the developer tools like <a href=\"https://nodesource.com/products/nsolid\">NodeSource N|Solid</a> and <a href=\"https://certified.nodesource.com/\">Certified Modules</a>, we've got a ton of tutorials, guides, and articles to help you get kick started with Node.js.</p>\n<p>If you're interested in keeping your code clean, maintainable, and collaborative, take a peek at our post on <a href=\"https://nodesource.com/blog/streamline-javascript-development-with-eslint\">using ESLint for linting your JavaScript applications</a>. Are you interested in building web applications with Node.js? One of the most challenging aspects of web apps is security - you can learn <a href=\"https://nodesource.com/blog/nine-security-tips-to-keep-express-from-getting-pwned\">security best practices for Express</a> to lock down your web apps, to prevent breaches and attacks. Or, maybe you want to deploy your Node.js apps with Docker? Then you should <em>definitely</em> read our article on <a href=\"https://nodesource.com/blog/8-protips-to-start-killing-it-when-dockerizing-node-js\">dockerizing your Node.js applications</a>.</p>\n<p>That said, if you want to keep in touch with the Node.js ecosystem, you should follow <a href=\"http://twitter.com/nodesource\">@NodeSource</a> on Twitter! We'll keep you updated with important news from the core Node.js project, fresh and useful Node.js tutorials, and more.</p>"}},"categories":[{"name":"How To","slug":"how-to"},{"name":"Node.js","slug":"node-js"},{"name":"Tutorials","slug":"tutorials"}]}}]},"contentfulHero":{"headLine":"List of useful articles and blog post on Node.js","coverImage":{"file":{"url":"//images.ctfassets.net/xmu5vdhtphau/3tCG630sR3116gwqT52u9C/dadf240e71f8ab06e2492da2e46a561a/blog-min.jpg","fileName":"blog-min.jpg"}}}},"pageContext":{"limit":7,"skip":28,"numPages":5,"currentPage":5,"type":"blog","hero":"hero-blogs","prevPath":"/blogs/page/4","nextPath":""}}}