Whether you’re joining an existing codebase or starting your first side project, it can be overwhelming to find the right tools to set things up. From installing software, configuring environments, or hunting down dependencies, to getting your software working together, you can try an abundance of different tools before you even write a single line of code. However, having a simple foundational setup can make everything easier. Here are the four core tools I’ve found essential for setup on a JavaScript project.
1. A Package Manager (Homebrew or WinGet)
Have you ever tried using a really cool-looking library, only to realize you need a whole bunch more tools before it can work? Well, you might really appreciate a package manager.
What’s a package manager?
A package manage…
Whether you’re joining an existing codebase or starting your first side project, it can be overwhelming to find the right tools to set things up. From installing software, configuring environments, or hunting down dependencies, to getting your software working together, you can try an abundance of different tools before you even write a single line of code. However, having a simple foundational setup can make everything easier. Here are the four core tools I’ve found essential for setup on a JavaScript project.
1. A Package Manager (Homebrew or WinGet)
Have you ever tried using a really cool-looking library, only to realize you need a whole bunch more tools before it can work? Well, you might really appreciate a package manager.
What’s a package manager?
A package manager helps you download, install, upgrade, and manage software. Instead of manually hunting down each tool you need, the package manager does the work for you—automatically fetching everything from trusted sources and organizing it into neat folders.
Think of it like a librarian who not only hands you the book you asked for, but also the reference materials you’ll need to understand it.
Recommended: Homebrew (macOS)
Homebrew, or just Brew, is the package manager I use for my projects on macOS. It’s especially good for installing developer tools that run via the command line.
In Homebrew, pieces of software you want to download that you would use through the Terminal command line are called “formulas,” while apps or software with their own GUIs are called “casks.” You would call any Homebrew command through your computer terminal with the starting word brew.
Common Homebrew Commands
brew update – Updates Homebrew itself
brew upgrade – Updates all installed packages
brew search [term] – Searches for packages by name
brew info [package] – Shows details about a package
brew install [package] – Installs a package and its dependencies
Installing Homebrew
-
Go to the brew home page
-
Copy the displayed command and paste it into Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- After installation, run the following to check that everything is up to date:
brew update
Windows users: You can use WinGet (comes preinstalled on Windows 10/11) or NPM: Node Package Manager, and NodeJS
2. Node.js and NPM (Node Package Manager)
Yes, this is a second package manager. But like doctors, package managers also have specializations — just like how you wouldn’t go to a primary care physician for a cardiology problem, you wouldn’t want to use Homebrew for every single part of your project. NPM, or Node Package Manager, is specialized for managing JavaScript project dependencies — Node.js in particular.
What is Node.js?
JavaScript was originally designed to run only in web browsers. But with Node.js (also known as NodeJS or simply Node), we can now run JavaScript on the server or locally—outside of the browser. This opened the door to using JavaScript for backend development, command-line tools, and full-stack applications. (Node.js can do a LOT more cool stuff, and I’m glossing over most of it, so if you’re interested there are a ton of excellent resources online to learn more!)
In short, Node.js is a blessing upon the world of JavaScript devs. It gives you a JavaScript runtime environment, and NPM helps manage JavaScript libraries for that environment. You will definitely want it to build your JavaScript project.
(As a bonus, Node comes with built-in modules like http, fs, and path, so you can build servers or work with the filesystem without downloading any additional software.)
How to Use Node and NPM
To create a Node.js project:
npm init -y – Creates a package.json file that keeps track of all your dependencies. To create a new project with the package.json file, simply use npm init
To install project dependencies, use:
npm install
Or, use this shorthand:
npm i
I run this each time before I run my code just to make sure there haven’t been any updates to my project’s dependencies.
To install a specific library (e.g., Lodash):
npm install lodash
To check versions:
node --version
npm --version
NPM requires that you download Node, but if you’ve installed NPM with a package manager (for example, Homebrew) that will have already been taken care of.
Installing Node and NPM
If you used Homebrew, you can install both Node and NPM with one command:
brew install node
Other than Homebrew and NPM, there are quite a few more package managers you might like to check out as well — if you’re interested, take a look at other Spin posts for some ideas.
3. Nodemon
Nodemon is a small tool that makes development smoother by automatically restarting your Node app whenever it detects changes in your directory, like when you save a file. In my opinion, it’s less of an essential JS dev tool and more of a (significant) quality of life improvement.
For example, if you’re testing a website on localhost, the page will automatically reload as soon as you save your code; without it, you’d need to stop and restart your server manually every time you make a change. It might not seem like much, but it definitely saves time in the long run.
How to Use Nodemon
In the command line, type:
nodemon app.js
(replace app.js with your main file)
Installation
Install globally using NPM:
npm install -g nodemon
It’s a small upgrade, but it makes a big difference—especially during local testing.
4. Jest (for Testing)
One of the most important steps in writing professional, quality code is testing, but it can also be the most tedious to set up. Thankfully, Jest makes it easier. Jest is a JavaScript testing framework developed by Meta. It works especially well with React, but also supports vanilla JavaScript and TypeScript. It’s great for writing unit tests, mocking data, and checking test coverage.
How to Add Jest
Install as a development dependency:
npm install --save-dev jest
In your package.json, add:
"scripts": {
"test": "jest"
}
To run tests:
npm test
Note: If you’re using create-react-app, Jest comes pre-installed.
Final Thoughts
One of the first lessons I learned as a new developer jumping into an established project is that project setup is never truly finished—it just slows down. As your app evolves, you’ll add new tools, dependencies, and configurations, but as long as you have a solid base, you can experiment to your heart’s content. Mastering these four tools — a package manager (like Homebrew), Node.jsNPM, Nodemon, and Jest — will cover most of your needs.
Happy coding, and have fun!