5 npm modules you can't live without?


What are some of the most common node modules that you use in every single project of yours? Name the top 5!

Let's make it fun, add some descriptions and leave links to the npm modules. :)

Learn Something New Everyday,
Connect With The Best Developers!

Sign Up Now!

& 500k+ others use Hashnode actively.

Sandeep Panda's photo

Nice question! Here are my favorite ones:

  • pm2 : To deploy every Node.js project.
  • node_redis: Every project of mine deals with sessions and I store my session data in Redis.
  • body-parser: Super useful. Helps me parse JSON, form data and so on easily
  • Mongoose: Most of my projects use MongoDB. So, mongoose is the library that I go with.
  • async: Super handy!
Bolaji Ayodeji's photo

I don't really have "favorites" but here are 5 I frequently use for different projects:

  • create-react-app: This allows you to set up a modern React app by running one command and installing one dependency, it then under the hood installs Webpack, Babel, ESLint, and other amazing projects to power your app thereby letting you focus on code, not build tools.

  • nodemon: Helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.

  • Pingmydyno: With Heroku free dynos, your app will fall asleep if it doesn't receive any web traffic within a 30-minute window. Pingmydyno pings your server periodically so it never falls asleep.

  • Axios: A Promise based HTTP client for the browser and node.js that allows you to make XMLHttpRequests from the browser, make http requests from node.js, transform request and lots more

  • HandleBars: An extension to the Mustache templating language that provides the power necessary to let you build semantic templates effectively with no frustration.

Marco Alka's photo

While these are more than 5 libraries, I don't really have any "favorites" globally. I have libraries I use for certain problems, and inside these fields, I have preferences. Nothing too surprising, though, I guess.

  1. All the TypeScript libraries (typescript, tslib, ts-loaders, type-files, etc.) and ts-node (for quickly running without transpiling)! I stopped writing libs and apps in JS entirely, because I love types, and I love declaring and consuming water-proof contracts. The first thing I do when I set up a new NodeJS or browser project is add TypeScript support.
  2. A bundler. I tested out WebPack, Rollup, Parcel and WebPack, and that's where I went back to in the end. Sure, it's a lot of work to set up, however it is far easier to handle complex needs and requirements later in the project than what the others offer. Ever tried to write web-components with support for handlebars, scss and typescript with Parcel? It's a nightmare. JAMStack? Don't even...
  3. What would be code without test? Mocha, and by extension ESLint for static code checks, Chai for assertions and Istanbul for coverage, are my favorites for this tedious task. They also work very well with my IDE, so I can even get in-line coverage and test info and tooling.
  4. From my Rust-development, I cannot but feel the need for monads sometimes. So, I usually also pull in an appropriate package.
  5. This might be more of a NodeJS thing, however when not in the browser, I usually require advanced file-system tools, which I can cover with fs-extra and glob.
  6. Since I did one for NodeJS, let me also add pug, handlebars and sass for the browser. No, I don't regularly React and I don't even Angular - though I really should give them more love, probably.
Syed Fazle Rahman's photo

Co-founder & CEO, Hashnode

Wow, that's a great list! Marco Alka. Thanks for sharing.

Mohd Shad Mirza's photo

I work on React Native mostly so here are my most used npm modules.

  1. ESLint: Makes code pretty
  2. react-native-vector-icons: Makes app pretty
  3. react-navigation: Navigation solution
  4. redux/mobx: State management, I prefer mobx for side projects.
  5. lodash: Sometimes needed.
Pankaj Patel's photo

For me the basic bundlers are the core requirement of every day work; rest is with WebComponents, and by design, this should not need too much support from other packages. Here are my all time needed packages

These would be used almost all the time, no matter what changes for the project.

  • webpack : with this entry I mean to have a bundler, I liked parcel a lot as well, though never used in a mainstream project. Someday I will make a full use of parcel and give webpack some rest ;)

  • babel : well it is pretty clear about why any JS project will use this and supporting packages. Though it is not the only player. with very few changes, TypeScript is a good replacement; maybe someday, not today.

  • eslint : nothing to add here, and no intentions to replace this. There might be alternatives; I would prefer to just know one tool to do this job and bother less about linting.

  • jest : a good test environment; very few people will disagree but that is a use case based opinion, my opinion as well. Let's see if I would need to change it.

  • postcss : This is to preprocess the css; and in my efforts to move away from LESS and SCSS, this is the best available tool. Nothing against LESS or SASS/SCSS, I would just get rid of system bindings for CSS preprocessing .

Syed Fazle Rahman's photo

Co-founder & CEO, Hashnode

Pankaj Patel Great list!


I don't know what to write in favourites, but here is a GitHub gist which ranks top 100 node packages and gets updated daily using a cron job.


Girish Patil's photo

While there are many that I use but here are the ones that I frequently use and are .

  • Passport-js
  • mongoose
  • mobx, mobx-react
  • moment
  • react-dnd
  • nodemon
j's photo

I was so looking forward reading ... yarn ;D ...

Want to read more?

Browse featured discussions

© 2020 · Hashnode