Some apps (afaik commune-governance and commune-validator) only builds (either with pnpm run build or turbo run build --filter) if the env var POSTGRES_URL is set.
Funny part, you don't need to set an URL to an existent and reachable DB, it works if you set something like "postgres://postgres:password@localhost:5432/database", so we shouldn't need to set this on build time.
Error log:
Attention:
Turborepo now collects completely anonymous telemetry regarding usage.
This information is used to shape the Turborepo roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://turbo.build/repo/docs/telemetry
• Packages in scope: commune-governance
• Running build in 1 packages
• Remote caching disabled
@commune-ts/db:build: cache miss, executing 929d635cb40f49b6
@commune-ts/db:build:
@commune-ts/db:build: > @commune-ts/db@0.1.0 build /app/packages/db
@commune-ts/db:build: > tsc
@commune-ts/db:build:
@commune-ts/api:build: cache miss, executing 771836304e8cebb4
@commune-ts/api:build:
@commune-ts/api:build: > @commune-ts/api@0.1.0 build /app/packages/api
@commune-ts/api:build: > tsc
@commune-ts/api:build:
commune-governance:build: cache miss, executing 1bf5c61481bcf645
commune-governance:build:
commune-governance:build: > commune-governance@1.0.0 build /app/apps/commune-governance
commune-governance:build: > next build
commune-governance:build:
commune-governance:build: Attention: Next.js now collects completely anonymous telemetry regarding usage.
commune-governance:build: This information is used to shape Next.js' roadmap and prioritize features.
commune-governance:build: You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
commune-governance:build: https://nextjs.org/telemetry
commune-governance:build:
commune-governance:build: ▲ Next.js 14.2.5
commune-governance:build:
commune-governance:build: Creating an optimized production build ...
commune-governance:build: ✓ Compiled successfully
commune-governance:build: Skipping validation of types
commune-governance:build: Skipping linting
commune-governance:build: Collecting page data ...
commune-governance:build: TypeError: Invalid URL
commune-governance:build: at new URL (node:internal/url:797:36)
commune-governance:build: at /app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:31:785
commune-governance:build: at /app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:31:1040
commune-governance:build: at oN (/app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:31:3357)
commune-governance:build: at 8207 (/app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:31:13317)
commune-governance:build: at t (/app/apps/commune-governance/.next/server/webpack-runtime.js:1:143)
commune-governance:build: at r (/app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:33:1731)
commune-governance:build: at /app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:33:1758
commune-governance:build: at t.X (/app/apps/commune-governance/.next/server/webpack-runtime.js:1:1275)
commune-governance:build: at /app/apps/commune-governance/.next/server/app/api/trpc/[trpc]/route.js:33:1744 {
commune-governance:build: code: 'ERR_INVALID_URL',
commune-governance:build: input: 'undefined'
commune-governance:build: }
commune-governance:build:
commune-governance:build: > Build error occurred
commune-governance:build: Error: Failed to collect page data for /api/trpc/[trpc]
commune-governance:build: at /app/node_modules/.pnpm/next@14.2.5_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/build/utils.js:1268:15
commune-governance:build: at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
commune-governance:build: type: 'Error'
commune-governance:build: }
commune-governance:build: ELIFECYCLE Command failed with exit code 1.
commune-governance:build: ERROR: command finished with error: command (/app/apps/commune-governance) /usr/local/bin/pnpm run build exited (1)
commune-governance#build: command (/app/apps/commune-governance) /usr/local/bin/pnpm run build exited (1)
Tasks: 2 successful, 3 total
Cached: 0 cached, 3 total
Time: 31.237s
Failed: commune-governance#build
ERROR run failed: command exited (1)
The command '/bin/sh -c pnpm turbo run build --filter=${APP_NAME}' returned a non-zero code: 1
Some apps (afaik commune-governance and commune-validator) only builds (either with pnpm run build or turbo run build --filter) if the env var POSTGRES_URL is set.
Funny part, you don't need to set an URL to an existent and reachable DB, it works if you set something like "postgres://postgres:password@localhost:5432/database", so we shouldn't need to set this on build time.
Error log: