Node.js system requirements
This page reflects the system requirements and capabilities of the latest version available on npmjs.com unless otherwise specified.
Before installing the Node.js agent confirm you can meet the following requirements:
There is a deployed application with a
package.jsonfile that has a name field, and Contrast supports the web application technology. The agent looks forpackage.jsonstarting in the working directory of the Node.js process. If the file is somewhere else, setagent.node.app_root. If the file has no name, setapplication.name.The agent has network connectivity with the Contrast server.
Install the agent with optional dependencies enabled. Do not use
--omit=optionalor--no-optional. Install on the same operating system, architecture and C library the application runs on, because npm installs the swc binary for the platform it runs on. If you build in one environment and deploy in another, install the agent in the deployment environment. If the binaries do not match, the agent logsFailed to load native bindingand the application starts without the agent.
Requirement | Recommended | Notes |
|---|---|---|
CPU |
| Windows on ARM64 or 32-bit Windows are not supported The Node.js agent has limited support for running on macOS systems with the M1/M2 chip, though it does not yet support running Alpine-based docker containers on the Apple M1/M2 (ARM64). ImportantUsing the Node.js agent will use more resources than your application on its own, and requires increasing the application's available CPU and memory due to the increased processing and analysis of inbound information. CPU load will also increase, but the specific application architecture and existing CPU usage profile heavily influence this. If you are using Assess, you should double the available memory in each container compared to what you would normally use without the Contrast Node.js agent. |
Operating system |
| |
Process managers |
|
|
Containers |
|
|
The agent does not run when Node.js starts with a flag that begins with --experimental or --permission. The agent instruments the main thread only, so worker threads run without instrumentation.