Skip to main content

cubby check

Run pre-deploy validations to catch issues before deploying. This command runs the same checks that happen during cubby deploy, but locally.

Usage

cubby check

What It Checks

  1. cubby.yaml exists - Ensures this is a Cubby project
  2. package.json valid - JSON is parseable, has build script
  3. Next.js config - Checks for output: "standalone" (required for Docker)
  4. Prisma schema - Validates schema if Prisma is used
  5. Build test - Runs npm run build to catch compile errors

Output

All Checks Pass

Running pre-deploy checks...

✔ cubby.yaml found
✔ package.json valid
✔ Next.js standalone output configured
✔ Prisma schema valid
✔ Build successful

All checks passed! Ready to deploy.

Check Failures

Running pre-deploy checks...

✔ cubby.yaml found
✔ package.json valid
✖ next.config missing output: "standalone" -- required for Docker builds
✔ Prisma schema valid
✖ Build failed

Type 'Item' is not assignable to type 'string'.
  app/page.tsx:15:7

Pre-deploy checks failed. Fix the issues above before deploying.

When to Use

Run cubby check before deploying to:
  • Catch build errors locally (faster feedback)
  • Validate configuration before uploading
  • Debug deployment failures
# Validate first
cubby check

# Then deploy
cubby deploy

Check Details

cubby.yaml

Every Cubby app needs a cubby.yaml file. If missing:
cubby init .

package.json

Must have a build script:
{
  "scripts": {
    "build": "next build"
  }
}

Next.js Standalone

Your next.config.ts must include:
const nextConfig = {
  output: 'standalone',
}

export default nextConfig
This is required for Docker deployment.

Prisma Validation

If your project uses Prisma, the schema is validated:
npx prisma validate
Common errors:
  • Invalid relation syntax
  • Missing required fields
  • Type mismatches

Build Test

The full build is run:
npm run build
This catches TypeScript errors, import issues, and other compile-time problems.

Environment Variables

If your project uses Prisma, cubby check provides a dummy DATABASE_URL for validation. This allows the build to succeed without a real database connection.

Exit Codes

CodeMeaning
0All checks passed
1One or more checks failed