Node.js background jobs are deployed on the Defer platform using your package.json file.

Supported Versions

Versions 18.x and 20.x are supported. By default, 18.x will be used. To use a specific version, or any constraint, add it in the engines field of your package.json as follows:

{
  ...
  "engines": {
    "node": "18.x"
  }
  ...
}

Dependencies

Npm, Pnpm, Yarn and Bun package managers are supported. The package manager to use is chosen based on the detected lockfile.

Here are the full details of detected package managers and their corresponding installation commands ran upon deploy.

LockfilePackage ManagerCommand
package-lock.jsonNPMnpm ci --no-audit
yarn.lockYarnyarn install --frozen-lockfile
pnpm-lock.yamlPNPMpnpm install --shamefully-hoist --frozen-lockfile
bun.lockbBunbun install --frozen-lockfile

Dependencies are installed with the exact versions found in the lockfile