Skip to content

Node.js

Node.js runtime and npm package manager run JavaScript applications and manage dependencies


The HPC system provides Node.js v10.24.0 and npm v6.14.11 for running JavaScript and managing packages.

Example Usage#

Create a file named hello.js with the following content:

console.log("Hello from Node.js on the HPC!");

Run it with:

$ node hello.js

Additionally you can install packages locally using npm:

1
2
3
4
$ mkdir my_project
$ cd my_project
$ npm init -y                # Initialize a project
$ npm install lodash         # Example: install lodash library

After installation, you can use the packages in your Node.js scripts.

For more information visit the Node.js or npm documentation websites.