This article will show how to install package or module using npm tool. Just type the command ‘npm’ in the command line. The execution of the command in this article is in Linux Ubuntu 18.10. Basically, in any kind of operating systems, as long as the ‘npm’ tool exist, the installation of any packages is possible. So, before moving on to the package installation of packages, just install the ‘npm’ tool first. If the ‘npm’ tool exist, just continue on to the command execution for installing packages. The following is an example of the ‘npm’ command execution :
user@hostname:~/express/myapp$ npm i npm WARN npm npm does not support Node.js v10.15.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/ added 53 packages from 37 contributors in 6.443s user@hostname:~/riset/express/myapp$
The above command execution is an ‘npm’ command to install any avaiable packages or modules. By specifying an additional parameter or argument which in this case it is the ‘i’ argument or parameter, it will automatically search for any available packages for further installation. That additional parameter or argument itself is actually stands for ‘install’ for the ‘i’ letter. So, the execution of the command will have the same result or the same impact if the addtional parameter or argument is in the full form as follows :
user@hostname:~/express/myapp$ npm install npm WARN npm npm does not support Node.js v10.15.2 npm WARN npm You should probably upgrade to a newer version of node as we npm WARN npm can't make any promises that npm will work with this version. npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9. npm WARN npm You can find the latest version at https://nodejs.org/ up to date in 0.745s user@hostname:~/express/myapp$