NodeJS download and install
Go to the official website of Node: Download stable versions. Stable versions with even numbers are selected, and early versions with odd numbers are selected (unstable, not recommended).
Configure the nodeJS environment variable
Right-click “Computer” to open “Properties”, “Advanced System Settings”, “Environment Variables”, “System Variables” Path variable to add nodeJS installation Path (e.g. F:\ nodej\), then click OK.
NPM package management tool
Node Package Manager (NPM) official website: NPM is automatically installed when nodeJS is installed on the official website. Open the terminal and enter NPM -v to view the installed version.
- NPM common instructions;
- NPM init: Bootstrap to create a package.json file
- NPM help(NPM -h) : View the NPM help information
- NPM version (NPM -v) : Displays the NPM version.
- NPM search: search
- NPM install (NPM I) : Install in the current directory by default, if there is no node_modules folder will be created;
- NPM install module_name -s or –save: NPM install module_name –save write dependencies
- NPM install module_name -d or –save-dev NPM install module_name –save-dev write devDependencies
- NPM install module_name -g
- NPM I module_name @1.0 is specified with the “@” sign;
- NPM update(npm-up) : updates
- NPM remove or NPM uninstall: Deletes
- NPM root View the current package installation path or run the NPM root -g command to view the global installation path.