1. Install Node.js and npm

Node.js Briefing

1. Installation
  • First of all, download Node.js (latest version: v6.9.5) from Node.js Offical Website.
    For Windows PC, select all components (even include "Add to Path").
  • After installation, open the Command Prompt to check if the installation is ok.
    input: node -v

    output: v6.9.5
C:\Users\LillianSiYin>node -v
v6.9.5

npm

1. Check Installation
  • Once the Node.js was installed, the nmp will also be installed. We can check the version of nmp by openning the Command Prompt.
    Input: npm -v Output: 3.10.10
C:\Users\LillianSiYin>npm -v
3.10.10
2. Brief Intro

Npm is actually a package management tool of Node.js.

Why do we need a package management tool? Because we developed on Node.js, which may use a lot of other people's JavaScript codes, which already put into a unique package. If we want to use a particular package, each time by name search the official website, download the code, extract, and then use, very troublesome.

So a centralized management tool came into being: we put their development of the module into the npm official website as different packages, if you want to use one of them, you can directly use it by install the npm.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容