Package Managers
Node.js Package Managers
Each Node.js application server includes out-of-the-box support for npm and Yarn. Both package managers use the npm registry and automate package installation, updates, configuration, and removal.

Package-Manager Overview
| Package Manager | Purpose | Platform Behaviour |
|---|---|---|
| npm | Manages additional modules, packages, and ready-to-use Node.js applications. | Used by default for archive and Git deployment through the dashboard. |
| Yarn | Provides an alternative package-management workflow focused on speed, reliability, and convenience. | Uses the same npm registry and the same package.json requirements as npm. |
Switch Between npm and Yarn
Open the container settings
Locate the Node.js application server and open its container settings or variables section.
Set the package manager
Set the PACKAGE_MANAGER container variable to either npm or yarn.

No application rewrite is required
Yarn uses the same package.json file as npm, so existing Node.js projects do not need to be restructured when changing the package manager.
Node Package Manager (npm)
There are two supported ways to install the packages required by a Node.js project.
Method 1: package.json Dependencies
Add the required modules to the dependencies section of the project’s package.json file. npm automatically downloads and installs them during application-server startup. Newly added dependencies are installed after the Node.js node is restarted.
Method 2: Manage Packages through SSH
Connect to the container through SSH Gate and use these commands:
npm search {package_name}
npm install {package_name}
npm uninstall {package_name}
npm update {package_name}
npm ls installed
| Command | Purpose |
|---|---|
npm search {package_name} | Search for modules by their full name or part of the name. |
npm install {package_name} | Install the required module. |
npm uninstall {package_name} | Remove a previously installed module. |
npm update {package_name} | Update the specified module to its latest available version. |
npm ls installed | List the already installed packages, as documented by the source page. |
Yarn Package Manager
Yarn operates with the same Node.js package.json file as npm. Connect to the container through SSH and use these commands:
yarn
yarn install
yarn remove {package}
yarn add {package}@{version}
yarn upgrade {package}@{version}
yarn list
| Command | Purpose |
|---|---|
yarn or yarn install | Install all dependency packages required by the project. |
yarn remove {package} | Remove the specified package. |
yarn add {package}@{version} | Add a package to the dependency list and install it. The version is optional; the latest is used by default. |
yarn upgrade {package}@{version} | Update the package. A specific version can be supplied as an optional argument. |
yarn list | Display all installed packages. |
Expected Result
The Node.js container uses the selected npm or Yarn package manager. Project dependencies can be installed automatically from package.json or managed manually through SSH commands.
Important Notes
- npm is the default package manager for archive and Git deployment.
- Use the
PACKAGE_MANAGERvariable to switch to Yarn. - Restart the Node.js node after adding new dependencies to
package.jsonwhen relying on startup installation. - Yarn and npm use the same package registry and project requirements.
- Run manual package commands from the correct project directory.
- Use a lock file appropriate to the chosen package manager for consistent deployments.
