Local builds
Run gigadrive build to install dependencies and run your build script in a production environment.
gigadrive build installs dependencies and runs your build script in the current directory with a
production environment. Use it when a Gigadrive Network build fails and you want the same shape of
run on your own machine, with your own logs and your own debugger.
It takes no arguments and no flags.
gigadrive buildRunning: pnpm install
...
Running: pnpm build
...
Build completed successfully.What it needs
A package.json in the working directory with a scripts.build entry. Without the file the command
stops at No package.json found; with the file but no build script, at
No build script found in package.json.
Package manager detection
The lock file decides, checked in this order. The first one found wins, so a directory holding both
yarn.lock and package-lock.json is treated as yarn.
| Lock file | Manager | Install | Build |
|---|---|---|---|
yarn.lock | yarn | yarn install | yarn build |
pnpm-lock.yaml | pnpm | pnpm install | pnpm build |
bun.lockb | bun | bun install | bun run build |
package-lock.json | npm | npm install | npm run build |
With no lock file at all, the CLI runs bun --version, uses bun if that succeeds, and falls back to
npm. Each step prints Running: <command> before it starts, and output is streamed as it arrives.
The environment it sets
Both the install and the build inherit your environment with four values layered on top:
| Variable | Value |
|---|---|
NODE_ENV | production |
NEBULA | 1 |
VERCEL | 1 |
NOW_BUILDER | 1 |
VERCEL is there because a large share of the framework ecosystem branches on it to pick a
serverless output mode, and the platform consumes that same output.
This is close to the hosted build, not identical to it
A deployment installs from the lock file first (npm ci for npm, --frozen-lockfile for pnpm) and leaves
NOW_BUILDER unset, because Next.js reads that flag as its own hosted builder and drops self-hosted runtime files
such as the image optimizer from standalone output. gigadrive build runs a plain install and sets NOW_BUILDER=1.
Treat a green local build as strong evidence, not as proof.
Local variables are also your own. A deployment resolves organization, application and environment variables and injects them into the build; nothing here reaches out for them. Pull them first with Environment variables when the build reads any.
