Setting Up Node Locally

Codecademy Team
Learn how to download Node on your local machine, so you can use the powerful Node.js runtime from your own computer.

What is Node?

Node.js is a JavaScript runtime, or an environment which runs JavaScript code outside of the browser. A “runtime” converts code written in a high-level, human-readable, programming language and compiles it down to code the computer can execute. Node was created with the goal of building web servers and web applications in JavaScript, but it’s a powerful and flexible environment that can be used for building all sorts of applications. Check out our course on Node to get to know the environment!

Installing Node

When you’re ready, running Node on your own computer is an exciting step towards becoming a developer. Playing on the Node REPL in your own terminal and executing your first local JavaScript program will set you on your way to building all sorts of exciting projects.

Before you install Node, you’ll need to make sure you have your command line set up.

Navigate to the Node website, and download the version of Node labeled “LTS” on the main page. For additional download options, such as different operating systems and versions, you can navigate to the Node downloads page.

After your download is complete, open the downloaded installation package and follow the installation instructions.

After installation, open a new terminal window. To confirm Node was downloaded, you can run the terminal command which node which will print the filepath to Node. You can also check which version of Node you downloaded with the node -v terminal command.

Note: The current LTS version of Node.js is v14.17.1. The Node version used in the videos below is older, but the installation process remains the same. If the node command is not found, try closing and reopening the terminal/Git Bash window.

Mac

Windows