Before the first week of class, take time to ensure all necessary tools and frameworks are correctly installed on your personal machine, including those we will use later on in the course.
Node.js. You are expected to install any tools you do not already have before the course begins. Confirm each tool is functioning properly by following all instructions below.
On OS X systems, install
Homebrew with the following command in your home directory:
$ brew install node
npm (node package manager, installed automatically with
Node) are in place by checking the versions (
Node should be 4.0.x or higher,
npm should be 3.6.x or higher):
$ node -v v14.5.0 $ npm -v 6.14.5
(If you have an older version of
Node already installed, upgrade through
Homebrew by running
$ brew upgrade node.)
Complete the "Working with Node" section below to confirm your installation is functioning correctly.
If you do not have Homebrew installed yet, you may install it now by copy and pasting this command:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
This installs Homebrew on your device.
Next, ensure Homebrew packages are run before the system versions of the same (which may be dated or not what we want) by executing the following:
$ echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
To install Node on other systems, go to the Node website, then download and install the appropriate installer for your operating system. Note that there are two versions available to download: the LTS version and the Current version. LTS is short for long-term support. Either version is fine, though the Current version will be more recent.
If you are using Windows, choose the Windows Installer option for downloading. Use the Setup Manager for installation, clicking Next through each setup window. This includes clicking Next on the custom setup window as all the options are already preselected (Node.js runtime, npm package manager, Online documentation shortcuts, and Add to PATH). When you reach the final setup window, click Install.
After installation is complete, go through the "Working with Node" section below to confirm your installation is functioning correctly.
Confirm Node.js is functioning correctly by creating a small test project.
cd to your desktop and then input the following command:
$ echo "console.log('Hello world');" > hello.js
echo simply copies the string (the part inside double quotations), outputting it (
>) into the file we specify (
hello.js). You don't need to create
hello.js ahead of time.
echo will take care of that for you.
Now let's run this file with Node:
$ node hello.js
"Hello world" will be printed to the terminal. Once you are done, you can remove
hello.js from your desktop.
If you encounter any issues installing Node.js, there will be an opportunity to receive setup assistance from Epicodus staff on the first Tuesday of the course. Hoever, even though we aren't using these frameworks yet, it's important to set up these tools now to make sure that you can use your personal computer to complete Epicodus projects.
Lesson 3 of 3
Last updated February 4, 2021