Zum Inhalt springen
GigadriveDocs

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 build
Running: 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 fileManagerInstallBuild
yarn.lockyarnyarn installyarn build
pnpm-lock.yamlpnpmpnpm installpnpm build
bun.lockbbunbun installbun run build
package-lock.jsonnpmnpm installnpm 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:

VariableValue
NODE_ENVproduction
NEBULA1
VERCEL1
NOW_BUILDER1

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.

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.