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

后端 未结 4 353
执念已碎
执念已碎 2021-02-01 01:32

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

相关标签:
4条回答
  • 2021-02-01 02:15

    Node.js or Node is an open-source, cross-platform, JavaScript runtime environment(JSRE) that executes JavaScript code outside of a web browser.

    npm is a package manager(like Nuget package manager in .NET -Microsoft ) for the JavaScript programming language. It is the default package manager for the JavaScript runtime environment Node.js.

    You can differentiate them by finding their version using below code.

    node --version
    
    npm --version
    
    0 讨论(0)
  • 2021-02-01 02:17
    • 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.

    0 讨论(0)
  • 2021-02-01 02:29

    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.

    0 讨论(0)
  • 2021-02-01 02:38

    Node JS

    • Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications.

    • Real-Time services (Chat, Games etc)

    NPM

    • Npm is a package manager. Typically this software is installed to build Node applications.

    • It let's you install software (libraries, plugins, frameworks and applications).

    0 讨论(0)
提交回复
热议问题