nodejs installation and configuration environment

Download ionic

       Installation using the command line

  1. Installation directory nodejs final installation in the C: \ Program Files \ nodejs
  2. Detection node installation was successful? node -v

If the error, because there is no default is installed in c drive program directory

We need to configure the environment variables

The first step :

 

Step two:

 

 

NPM       Node Manager Package management tools, the management module (package) of the tool

Modular benefit: decoupling, reduce the degree of coupling, can be reused to improve development efficiency, contribute to team development.

How to define modules:

       1. In the node, all modules are folders.

 

How to use the module:

  1. Direct download npmjs official of        https://www.npmjs.com/

Npm install the module name shorthand npm I module name

After the download is complete, all the packages are present node_modules folder

Var j = require ( "package name");

  1. Artificial package

1. The need to create a way to enter package.json file npm init entry point to note is this property

2. The package can not be directly defined by the require ( "package name"), with a relative path. If you have to use the package name directly, you need to put your bag node_modules folder.

 

 

Guess you like

Origin www.cnblogs.com/z1287529611/p/11803044.html