Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between node.js runtime and npm package manager options while installing node.JS?

Tags:

node.js

npm

I am trying to install node.js by downloading the .exe file, I am confused and stuck on the Node.js setup where in it asks to install node.js runtime or npm package manager so I want to proceed through the installation after knowing fully the difference between the two.

My question is what is the difference between node.js runtime and npm pacakage manager and what are all the features do I get on the two options.

My basic purpose of installing node.js is to compile Typescript, Please help me to understand the features of the two package screen shot of the installation window

like image 336
Lijin Durairaj Avatar asked Jan 16 '17 11:01

Lijin Durairaj


People also ask

What is the difference between npm install and npm install?

npm install , or npm i , is used to install dependencies: It will install all the dependencies. If you use ^ or ~ when you specify the version of your dependency, npm may not install the exact version you specified. npm install can update your package-lock.

Does installing Node.js also install npm?

The Node. js installer carries the Node. js core file, and, consequently, the installation process installs both Node. js and npm from the installer file.


2 Answers

First of all, it does not ask you to install Node.js runtime OR npm package manager, it offers you to install them both (if you want)

Now, Node.js runtime is basically what will understand your javascript code and execute it to produce a result.

Npm package manager is a tool which will allow you to install third party libraries (other people's code) by using the command line.

npm install express 

will install the framework called express for example.

like image 112
soueuls Avatar answered Sep 22 '22 05:09

soueuls


  • Node and Nodejs are the same. Interchangeable names for the same thing. Unless someone is talking about graph theory, trees or data structures.
  • Nvm is a Nodejs version manager. It let's you easily install and switch between versions. It retains globally installed packages for each version.
  • Npm is a package manager. It let's you install software (libraries, plugins, frameworks and applications). Typically this software is installed to build Node applications. Sometimes it isn't.

Put more simply. Npm depends on Node. Nvm installs Node.

like image 42
bat Avatar answered Sep 20 '22 05:09

bat