Introduction
The Oracle® GraalVM JavaScript Runtime implements ECMAScript standards and does not include modules that are specific for Node.js such as http
, fs
etc., for details see https://www.graalvm.org/latest/reference-manual/js/Modules/
The Oracle® GraalVM allows to install packages that work as replacements for Node.js modules.
Use of Oracle® GraalVM for jobs is available starting from the following releases:
FEATURE AVAILABILITY STARTING FROM RELEASE 2.5.4
FEATURE AVAILABILITY STARTING FROM RELEASE 2.6.1
Installation
Users can install Node.js packages in the JS7 Agent's data directory like this:
Example how to install JavaScript Runtime packages for Linux
# set location of GraalVM JAVA_HOME=/opt/java/graalvm-community-openjdk-17.0.7+7.1 PACKAGE_HOME=/var/sos-berlin.com/js7/agent/node_modules # install Node.js packages # installed packages by default will be located in $JAVA_HOME/bin/node_modules sub-directory # it is recommended to use the --prefix argument to specify a location in the Agent's data directory $JAVA_HOME/bin/npm install --prefix $PACKAGE_HOME -g url $JAVA_HOME/bin/npm install --prefix $PACKAGE_HOME -g http $JAVA_HOME/bin/npm install --prefix $PACKAGE_HOME -g Buffer
Overview
Content Tools