Sitemap

Node.js — Modules and their management

2 min readJul 3, 2017

--

Hello Stranger,

I have been thinking about the filtered basic knowlege of Node.js. Hence I have decided to collect info from various sources for same and would like to present here. I apologies in advance if anything mismatch from the fact.

Node.js:- Is it a new language other than JavaScript? No, it’s not; then what it is?

Actually every browser has their own interpreter to run JS code along with a bunch of libraries and a run-time environment for working with web pages. For example:

Firefox has an engine called Spidermonkey, Safari has JavaScriptCore, and Chrome has an engine called V8.

Node.js is simply the V8 engine bundled with some libraries to do I/O and networking, so that you can use JavaScript outside of the browser, to create shell scripts, back-end services or run on hardware. These libraries called as node_modules.

There are different type of modules available for Node.js and the basic & core modules ships with the installation of node. However other modules are also available over the internet to get installed by running npm install (node package manager ) command.

What is the Node Package Manger?

Originally, NodeJs was intended as a server environment for applications, but developers started using it to create tools to aid them in local task automation. Since then, a whole new ecosystem of Node-based tools (such as Grunt, Gulp and Webpack) has evolved to transform the face of front-end development.

To make use of these tools (or packages) in Node.js, we need to be able to install and manage them in a useful way. This is where NPM, the Node package manager, comes in.

Get Premchand Kumar’s stories in your inbox

Join Medium for free to get updates from this writer.

As like core node_module there there is a default package manager is also available called “npm” . So once you install a node with the latest version you will automatically get the latest package manager(npm) as well.

Since everything in computer science should be reliable and perform closely to the benchmark in respective criteria. Hence some other package manger was also developed to handle a vast and continuously growing-up tools in the Node.js community. For example: “Yarn” and “pnpm”

As most of the beginners uses npm for the installation of node_modules/packages/tools, you may update your npm at any time by running the following command:

npm install npm -g

Stay tuned for more on Yarn and pnpm………….

For more info please do visit the following sites:

Node.js : https://nodejs.org/en/

Node_modules: https://nodejs.org/docs/v0.4.1/api/modules.html#core_Modules

NPM: https://docs.npmjs.com/getting-started/what-is-npm

https://www.sitepoint.com/beginners-guide-node-package-manager/

--

--