Docs menu
Node.js
Deploy Node.js apps on Primcloud: the Node.js versions and package managers the Primcloud Runtime ships, plus deploy guides for Next.js and Express.
On this page
Primcloud deploys Node.js apps managed by npm, pnpm, or Yarn. Detection triggers when Primcloud finds a package.json at the root of your repo. A package.json app with a Bun lockfile is a Bun app instead. The Node.js version is resolved from engines.node in package.json, and the package manager is picked from engines.<pm>, the packageManager field, or the lockfile that ships in the repo.
With no Procfile, the runtime derives a web process for you: npm start (or the pnpm/Yarn equivalent) when package.json declares a start script, otherwise node server.js or node index.js if either file sits at the repo root. An app with none of those (no Procfile, no start script, no server.js or index.js) has nothing to launch, and the deploy fails until you add one. Native modules that compile via node-gyp are supported out of the box.
Both server-side apps (Express, Fastify, Koa) and framework builds that produce a Node.js runtime process (Next.js, Nuxt, Remix, NestJS) deploy the same way: pick a package manager, ship a lockfile, and let Primcloud handle the rest.
What's in this section#
- Getting started with Node.js: deploy a minimal Express app end-to-end.
- Node.js on Primcloud: detection, install and compile phases, build script hooks, and how the default
webprocess is chosen. - Runtime versions: supported Node.js versions,
engines.nodesemver ranges, and upgrade path. - Package managers: how npm, pnpm, and Yarn are each selected and installed, and how to authenticate against private registries.
- Customizing the build: build hooks (
heroku-prebuild,heroku-build,heroku-postbuild), dev-dependency pruning, native modules, and Debian packages viaproject.toml. - Troubleshooting Node.js: common build and runtime errors with fixes.
- Deploying Next.js:
Procfile, env vars, standalone output, and framework-specific gotchas. - Deploying Express:
Procfile, port binding, and common patterns for Express apps.