NPM is classified as an online repository for publishing open source projects for Node.js and is a command-line utility that interacts with this online repository to help with package installation, version management, and dependency management.
Take some time and walk through the NPM documentation at https://docs.npmjs.com/ to learn more.
The following screenshot displays TypeScript under NPM repository:
TypeScript provided by the NPM repository
Node.js already comes with an NPM version. The auto-update is disabled by default. To easily update your version of npm, you can run the following command on the Terminal:
$ sudo npm install npm --global
Right after the command finishes its execution, check the npm version:
$ npm -v
The result should be something similar to the following:
$ 6.4.1 // or any higher version