It’s 2 a.m. I’m three Red Bulls deep, debugging a layout issue that appeared out of nowhere.
The CSS looks fine. The markup looks fine.
My soul? Not so much.
In desperation, I install one NPM package. Hit save. Boom. Fixed.
And that’s when it hit me: I don’t write JavaScript. I compose symphonies of dependencies.
My job? 10% writing code, 90% knowing what package to install.
Here are the top 10 NPM packages that keep me (relatively) sane.
Some are old friends. Some are new obsessions. All are absolutely essential.

1. Prettier
Because code formatting arguments are a waste of life.
Look, I’m not here to debate tabs vs spaces. Prettier doesn’t care, and neither should you.
It formats your code one way — the right way. Every time I save, my mess turns into beauty. It’s like auto-tune for code.
npm install --save-dev prettier
Use it. Love it. Never look back.
2. ESLint
Because you’re not as perfect as you think you are.
I used to believe I was a clean coder.
ESLint showed me the truth: I was writing spaghetti with extra cheese.
From catching unused variables to enforcing best practices, ESLint is like that brutally honest friend who tells you when your code stinks.
Bonus points for pairing it with Prettier.
npm install eslint --save-dev
3. dotenv
Stop hardcoding secrets, you maniac.
If you’ve ever pushed an API key to GitHub, we need to talk.
dotenv lets you store environment variables in a .env file like a civilized developer.
npm install dotenv
Then just:
require('dotenv').config();console.log(process.env.MY_SECRET);
Your future self will thank you.
4. axios
Because
fetchis fine, but axios is divine.
Yeah, yeah, fetch is built-in. But have you ever chained error handling with it?
Axios just works better. Cleaner syntax.
Built-in JSON handling. Interceptors. It’s like fetch, but with manners.
npm install axios
5. nodemon
Because restarting your server manually is medieval.
Every time I used to Ctrl + C and restart the server, a piece of me died.
nodemon watches for changes and restarts your app for you. It’s the lazy dev’s best friend.
npm install --save-dev nodemon
Add it to your scripts and stop suffering.
6. chalk
Because your terminal deserves a little flair.
Who said logs have to be boring? chalk lets you color your console output, and suddenly console.log feels like performance art.
Debugging becomes less dreadful when it looks like a rainbow.
npm install chalkconsole.log(chalk.green('Success!'));
7. lodash
Because JavaScript has weird gaps.
Sure, JS has improved. But lodash still fills in the gaps with grace.
Deep clones? Debounce? Throttle? Yup.
It’s like carrying a Swiss army knife in your code.
npm install lodash
Also, _.get() alone is worth the price of admission.
8. date-fns
Because moment.js is a heavy dinosaur.
Need to format, parse, or manipulate dates without shipping a time machine worth of bytes?
date-fns is modern, modular, and elegant.
npm install date-fnsimport { format } from 'date-fns';console.log(format(new Date(), 'yyyy-MM-dd'));
9. jsonwebtoken
Because auth is hard, but this helps.
User authentication isn’t optional.
jsonwebtoken makes signing and verifying JWTs almost painless. Almost.
npm install jsonwebtoken
Remember: with great tokens comes great responsibility.
10. uuid
Because IDs should be unique. Duh.
If you’re generating IDs manually, stop. uuid is fast, standards-compliant, and idiot-proof.
npm install uuidimport { v4 as uuidv4 } from 'uuid';console.log(uuidv4());
It’s like giving every object a digital passport.
Honorable Mentions
cors: Because you love testing locally and hate errors.express: Because Fastify fans will still argue, but Express works just fine.react-icons: Because nobody wants to download SVGs manually anymore.
Finally, Use Tools, Not Crutches
Let’s be clear. These packages don’t write your code.
They just make the job less of a grind.
But be warned: NPM addiction is real. Don’t install packages just because you can.
Use the ones that make you faster, smarter, and slightly less likely to rage-quit.
Agree? Disagree? Got a holy-grail package I missed?
Smash that clap button, drop a comment, or roast me in the replies.
I’m all ears (and caffeine).
Happy coding!