未加星标

Installing Node.js Tutorial: Windows

字体大小 | |
[前端(javascript) 所属分类 前端(javascript) | 发布者 店小二05 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

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.

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.

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.

Step 0: The Quick Guide (TL;DR) to Get Node.js Installed on Windows

Here's the abbreviated guide, highlighting the major steps:

Open the official page for Node.js downloads and download Node.js for Windows by clicking the "Windows Installer" option Run the downloaded Node.js .msi Installer - including accepting the license, selecting the destination, and authenticating for the install. This requires Administrator privileges, and you may need to authenticate To ensure Node.js has been installed, run node -v in your terminal - you should get something like v6.9.5 Update your version of npm with npm install npm --global This requires Administrator privileges, and you may need to authenticate Congratulations - you've now got Node.js installed, and are ready to start building! Step 1: Download the Node.js .msi Installer

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 official downloads page for Node.js .

You'll be able to download the Windows Node.js installer by clicking the Windows Installer 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!

Step 2: Run the Node.js Installer

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:

Welcome to the Node.js Setup Wizard Select Next End-User License Agreement (EULA) Check I accept the terms in the License Agreement Select Next Destination Folder Select Next Custom Setup Select Next Ready to install Node.js Select Install Note: This step requires Administrator privlidges. If prompted, authenticate as an Administrator Installing Node.js Let the installer run to completion Completed the Node.js Setup Wizard Click Finish Step 3: Verify that Node.js was Properly installed

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 cmd.exe , Powershell , or any other command prompt):

$ node -v

If Node.js was installed fully, the command prompt will print something similar to (but probably not exactly ) this:

$ node -v // The command we ran - prints out the version of Node.js that's currently installed v6.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. Step 4: Update the Local npm Version

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.

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 certainly going to be a newer version of npm available than the one that is installed as a default in any given Node release.

To quickly and easily update npm , you can run the following command:

npm install npm --global // Update the `npm` CLI client Step 5: Go build applications, APIs, tools, and more with Node.js!

Now you've got Node.js on Windows machine. It's time to start exploring!

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 some of the most exciting ES6 features in Node.js . If you're interested in ways to collaborate with your team a bit better, you should check out our tutorial on using ESLint in projects to improve team collaboration through code standards . 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 how to deploy Node.js apps on linux with systemd !

That said, if you want to keep in touch with Node.js and the surrounding ecosystem, you should go follow @NodeSource 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.

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

主题: Node.jsWindowsLinuxWindows 7Twitter
分页:12
转载请注明
本文标题:Installing Node.js Tutorial: Windows
本站链接:http://www.codesec.net/view/532333.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(61)