Skip to content

npm

npm manages JavaScript dependencies and project scripts. The catalog links it to a matching Node.js branch.

Available versions

Options include npm for Node.js 22, 24 and 26. These numbers identify the related Node.js branch, not the npm version. Installation resolves the current npm release and checks compatibility with the installed managed Node.js version. If incompatible, installation is rejected; an older npm release is not automatically selected.

These options come from the application installation catalog. A catalog entry alone does not guarantee package availability on every server; verify the exact installed version in the service inventory.

Install

  1. Choose npm for the required Node.js branch.
  2. Check the related runtime and any default-version option.
  3. Verify the service card's commands as the project user. Short node and npm commands require a configured default version and matching PATH.

For example, managed npm for Node.js 24 runs as /opt/grape-cloud/runtimes/npm24/current/managed-bin/npm --version. npm24 is a service identifier, not a shell command. Its launcher uses the matching managed Node.js. Dependency installation scripts also need Node.js in PATH.

Set as the terminal default exposes node, npm and npx in /usr/local/bin for the matching branch, including for existing installations. See Node.js for a temporary PATH example.

Dependencies and builds

Work in the directory containing package.json. With a matching lockfile and appropriate workflow, use npm ci for repeatable deployment; other projects may require a different installation command.

Build using scripts in package.json, such as npm run build if it exists. Configure these commands in deployment with the correct directory and user.

Run the application

Building does not automatically start an HTTP server. Configure any persistent application command through processes and connect the web server.

For errors, check Node.js version, lockfile, available scripts and permissions. npm may execute dependency installation scripts; review their output as part of deployment verification.