Installing Node
We will need Node.js
to run JavaScript code in our IDE.
Setting up Node
Installing Node on your computer also installs the NPM Command Line Interface (CLI), which allows you to run specialized commands in the terminal .
Follow this link to the Node website , and examine the selection screen:
The LTS version of Node is an older, reliable build that has been tested, debugged, and runs well. The Current version brings in newer features, but it is still being tested. Either option works for this course, but we recommend downloading the LTS version.
Click on the Windows or MacOS icon to download the installer to your computer. If you have a different operating system, select its 64-bit option from the list below the icons.
Run the installation program and follow the on-screen instructions.
- Accept the license agreement.
- When asked for the installation location, etc., use the default options.
Verify that the installation was successful by opening a new terminal window and running the command
node -v
. The output should match the version you downloaded.$ node -v v##.##.#
NoteAfter installing new programs, you will need to open a new terminal window to run their commands for the first time. This includes node both
Node.js
andGit
. If you see a ‘_ is not recognized as an internal or external command’ error (Windows) or ‘command not found’ error (Mac), this might be the case.NoteAt the time of this walkthrough was last updated, December 2023, the
LTS
version of node is20.9.0
. As long as your node version is20.x.x
then you should not encounter any issues within this book.Troubleshooting: If it doesn’t install, try adding
sudo
beforenpm
and then run the command again.