Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Users can install Node.js 3rd-party packages in any location, preferably in the Oracle® GraalVM's ./bin directory. Consider to use a current version of the Oracle® GraalVM:

Code Block
languagebash
titleExample how to install JavaScript Runtime packages for Linux
linenumberstrue
# set location of GraalVM
JAVA_HOME=/opt/java/graalvm-community-openjdk-17.0.7+7.1

# install Node.js packages in $JAVA_HOME/bin/node_modules sub-directory
$JAVA_HOME/bin/npm install url
$JAVA_HOME/bin/npm install Buffer

Note: Adding 3rd-party packages does not require restart of a JS7 Agent. Instead, the package will be considered with the next execution of the job.

Configuration

By default the Oracle® GraalVM does not allow to load 3rd-party packages using the require() function. Users who wish to add such packages to their JavaScript jobs can create a JS7 - Job Resource that holds the required configuration items.

...