See the node.js project pageopen in new window. To use node.js, you’ll use the module tool.

You can see what versions are available by using:

[me@login01 ~]$ module avail node

------------------------------ /opt/modulefiles -------------------------------
   node/19.0.0

Use "module spider" to find all possible modules and extensions.
Use "module keyword key1 key2 ..." to search for all possible modules matching
any of the "keys".

To load a specific version, you would use:

[me@login01 ~]$ module load node/19.0.0

while the "node" wildcard will load the default version, node-19.0.0 in this case.

You should now be able to run node.js commands:

[me@login01 ~]$ node --help
Usage: node [options] [ script.js ] [arguments]
      node inspect [options] [ script.js | host:port ] [arguments]

Options:
  -                           script read from stdin (default if no
                              file name is provided, interactive mode
                              if a tty)
  --                          indicate the end of node options
  --abort-on-uncaught-exception
                              aborting instead of exiting causes a
                              core file to be generated for analysis
  --build-snapshot            Generate a snapshot blob when the
                              process exits. Currently only supported
                              in the node_mksnapshot binary.
  -c, --check                 syntax check script without executing
  --completion-bash           print source-able bash completion
                              script
  -C, --conditions=...        additional user conditions for
                              conditional exports and imports
  --cpu-prof                  Start the V8 CPU profiler on start up,
                              and write the CPU profile to disk
                              before exit. If --cpu-prof-dir is not
                              specified, write the profile to the
                              current working directory.
  --cpu-prof-dir=...          Directory where the V8 profiles
                              generated by --cpu-prof will be placed.
                              Does not affect --prof.
  --cpu-prof-interval=...     specified sampling interval in
                              microseconds for the V8 CPU profile
                              generated with --cpu-prof. (default:
                              1000)
  --cpu-prof-name=...         specified file name of the V8 CPU
                              profile generated with --cpu-prof