Nodejs is used to create server-side web applications, and it is perfect for data-intensive applications since it uses an asynchronous, event-driven model
Availability and Restrictions
Versions
Nodejs is available on the Pitzer, Owens, and Ascend Clusters. The versions currently available at OSC are:
Version | Owens | Pitzer | Ascend | Cardinal |
---|---|---|---|---|
14.17.3 | X* | X* | X | |
18.18.2 | X | X | X | |
20.12.0 | X |
You can use module spider Nodejs
to view available modules for a given machine. Feel free to contact OSC Help if you need other versions for your work.
Access
Nodejs is available to all OSC users. If you have any questions, please contact OSC Help.
Publisher/Vendor/Repository and License Type
OpenJS Foundation, Open source
Usage
Usage on Owens
Set-up
To load the default Nodejs library, run the following command: module load nodejs
. To load a particular version, use module load nodejs/version
. For example, use module load nodejs/14.17.3
to load Nodejs version 14.17.3. You can use module spider nodejs
to view available modules.
Nodejs version 18.18.2 Usage
Nodejs verion 18.18.2 is contianerized. To learn more about containers see: HOWTO: Use Docker and Apptainer/Singularity Containers at OSC.
To use nodejs/18.18.2 simply run:
node
or
apptainer exec $NODE_IMG node
Both of the above commands will also work with additonal command line arguments such as node script.js
and apptainer exec $NODE_IMG node script.js
.
If you need to use npm with node/18.18.2 then you will need to first open a shell in the container. To do so run:
node_shell
or
apptainer shell $NODE_IMG
Now within this shell you can run node
and npm
.
Batch Usage
When you log into owens.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.
Usage on Pitzer
Set-up
To load the default Nodejs library, run the following command: module load nodejs
. To load a particular version, use module load nodejs/version
. For example, use module load nodejs/14.17.3
to load Nodejs version 14.17.3. You can use module spider nodejs
to view available modules.
Nodejs version 18.18.2 Usage
Nodejs verion 18.18.2 is contianerized. To learn more about containers see: HOWTO: Use Docker and Apptainer/Singularity Containers at OSC.
To use nodejs/18.18.2 simply run:
node
or
apptainer exec $NODE_IMG node
Both of the above commands will also work with additonal command line arguments such as node script.js
and apptainer exec $NODE_IMG node script.js
.
If you need to use npm with node/18.18.2 then you will need to first open a shell in the container. To do so run:
node_shell
or
apptainer shell $NODE_IMG
Now within this shell you can run node
and npm
.
Batch Usage
When you log into owens.osc.edu you are actually logged into a linux box referred to as the login node. To gain access to the mutiple processors in the computing environment, you must submit your job to the batch system for execution. Batch jobs can request mutiple nodes/cores and compute time up to the limits of the OSC systems. Refer to Queues and Reservations and Batch Limit Rules for more info.