Node.js and npm

Node.js is a JavaScript runtime environment, and npm is a package manager for Node projects. We'll use both as tools for building the frontend of our web applications.

Spring 2023: Only the French Playing Cards team needs npm and node.

Returning UROPs: You probably need to update Node. Run the installer as below.

Check if you have Node and npm installed

Open your terminal and run node --version

If you get an error, or if the version you have installed is < 20.11, continue below to Installing Node.js and npm

If you have Node >= 20.11, run npm --version

If you get an error, or if the version you have installed is < 10.2, continue below to Installing Node.js and npm.

Installing Node.js and npm

Download the Node.js installer from the Node Website.

Make sure that you download the LTS (Long Term Support) version (marked "Recommended For Most Users"), not the Current version, which is potentially unstable.


Run the installer; the default options are all fine.

On Windows, the Node.js installer will ask if you want to install Tools for Native Modules. Do not do so. (This option installs a whole bunch of extra stuff that will later cause you a headache.)

After the installer has finished, verify that everything was installed properly by opening your terminal and once again entering the following commands:

node --version

and

npm --version

If both of these commands run without errors and return a version number (node >= 20.11, npm >= 10.2), then you have successfully installed Node.js and npm.

That's it for tools!

That's all the software you'll need to do your work for the DH Lab. Next, we'll move on to installing this semester's project.

← Python Back to home →