What is NPM, and what is Nodejs? We assume they are the same, but it’s not the case. Let’s dive into the difference.
Node or Nodejs is a runtime environment for JavaScript based on Google’s V8 interpreter that executes JavaScript code outside of a web browser. It allows Javascript code to run on servers without a web browser. When we talk about Javascript (or even Typescript), we think of web development, primarily front-end. Before Nodejs, there was no solution to run Javascript outside a web browser.
NPM is the acronym for Node Package Manager. What it does is help to organize the dependencies of a project using Nodejs. It lets you install and update all your dependencies. For example, go to the package.json file of React boilerplate you will see that there is a lot of dependencies for the built environment as well as the dev environment. NPM help developers to manage all those dependencies.