Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore(dx): remove build:check and the .next-check build directory (#18653)

Nimar7947672b13e2
diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md
index c518b0d044..a1fe895c37 100644
--- a/.agents/AGENTS.md
+++ b/.agents/AGENTS.md
@@ -146,7 +146,6 @@ langfuse/
(client tests: `pnpm --filter web run test-client <file>`)
- worker: `pnpm --filter worker run test <file>`
- shared: `pnpm --filter @langfuse/shared run test <file>`
-- Build check: `pnpm run build:check`
- Full build: `pnpm run build`
- Shared agent/worktree bootstrap: `bash scripts/agents/setup.sh`
- Worktree maintenance: `bash scripts/codex/maintenance.sh`
@@ -265,7 +264,6 @@ Do not hand-edit generated or build artifacts:
- `generated/*`
- `web/.next/*`
-- `web/.next-check/*`
- `*/dist/*`
- `packages/shared/prisma/generated/*`
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ce2ae63bb8..6bf180c132 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -326,7 +326,6 @@ pnpm run db:seed:examples
pnpm run dev
pnpm --filter=web run dev # execute command only in one package
pnpm tc # fast typecheck all packages
- pnpm build:check # Full Next.js build to alternate dir (can run parallel with dev server)
```
In the root `package.json`, you can find scripts which are executed with turbo e.g. `turbo run dev`. These scripts are executed with the help of Turbo. Turbo executes the commands in all packages taking care of the correct order of execution. Task definitions can be found in the `turbo.config.js` file.
diff --git a/ee/package.json b/ee/package.json
index 6e6af29145..6341702afe 100644
--- a/ee/package.json
+++ b/ee/package.json
@@ -19,7 +19,6 @@
},
"scripts": {
"build": "tsc",
- "build:check": "tsc",
"typecheck": "dotenv -e ../../.env -- tsc --noEmit --skipLibCheck --incremental --tsBuildInfoFile .tsbuildinfo",
"dev": "tsc --watch",
"lint": "eslint . --cache --cache-location dist/.eslintcache --max-warnings 0 --concurrency 2",
diff --git a/package.json b/package.json
index e191fb2207..9c3d7824bd 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,6 @@
"dx-f": "pnpm i && pnpm run infra:dev:prune && pnpm run infra:dev:up --pull always && pnpm --filter=shared run db:reset:test && pnpm --filter=shared run db:reset -f && SKIP_CONFIRM=1 pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"dx:skip-infra": "pnpm i && pnpm --filter=shared run db:reset:test && pnpm --filter=shared run db:reset && pnpm --filter=shared run ch:reset && pnpm --filter=shared run db:seed:examples && pnpm run dev",
"build": "turbo run build",
- "build:check": "turbo run build:check",
"typecheck": "turbo run typecheck",
"tc": "turbo run typecheck",
"start": "turbo run start",
diff --git a/packages/config-eslint/next.js b/packages/config-eslint/next.js
index 3537c343a8..567ca0cd02 100644
--- a/packages/config-eslint/next.js
+++ b/packages/config-eslint/next.js
@@ -12,7 +12,7 @@ export default [
// Global ignores - include config files
{
name: "langfuse/ignores",
- ignores: ["**/.next/", "**/.next-check/"],
+ ignores: ["**/.next/"],
},
// Use the plugins directly because this repo owns its parser and import resolver setup.
diff --git a/packages/shared/package.json b/packages/shared/package.json
index 990358e3fb..1e8f86416c 100644
--- a/packages/shared/package.json
+++ b/packages/shared/package.json
@@ -182,7 +182,6 @@
},
"scripts": {
"build": "tsc",
- "build:check": "tsc",
"typecheck": "dotenv -e ../../.env -- tsc --noEmit --incremental --tsBuildInfoFile .tsbuildinfo",
"dev": "tsc --watch",
"lint": "eslint . --cache --cache-location dist/.eslintcache --max-warnings 0 --concurrency 2",
diff --git a/turbo.json b/turbo.json
index 9a28346884..eb94ac3ee7 100644
--- a/turbo.json
+++ b/turbo.json
@@ -104,17 +104,6 @@
"outputLogs": "errors-only",
"outputs": []
},
- "build:check": {
- "dependsOn": ["db:generate", "^build"],
- "env": ["NEXT_IGNORE_BUILD_ERRORS"],
- "outputs": [
- ".next-check/**",
- "!.next-check/cache/**",
- "!.next-check/dev/**"
- ],
- "cache": true,
- "outputLogs": "errors-only"
- },
"test": {
"dependsOn": ["^test", "db:generate"],
"cache": true
diff --git a/web/AGENTS.md b/web/AGENTS.md
index 00c2c00684..5d162bd8f7 100644
--- a/web/AGENTS.md
+++ b/web/AGENTS.md
@@ -353,7 +353,7 @@ Sentry instrumentation skill first and decide whether it should capture at all
- Run Vitest in-source utility coverage with `pnpm --filter web run test:in-source`;
do not try to target these through `test-client` or by assuming a separate
`*.clienttest.*`/`*.servertest.*` file exists.
-- Do not hand-edit build artifacts: `.next/*`, `.next-check/*`, `dist/*`.
+- Do not hand-edit build artifacts: `.next/*`, `dist/*`.
<!-- BEGIN:nextjs-agent-rules -->
diff --git a/web/next.config.mjs b/web/next.config.mjs
index 8938270e6e..abb4d2e55d 100644
--- a/web/next.config.mjs
+++ b/web/next.config.mjs
@@ -87,8 +87,6 @@ const nextConfig = {
// symbolication is handled separately by uploading maps with debug IDs (see
// `sourcemaps` in withSentryConfig below).
productionBrowserSourceMaps: true,
- // Allow building to alternate directory for parallel build checks while dev server runs
- distDir: process.env.NEXT_DIST_DIR || ".next",
typescript: {
// CI test jobs run `pnpm run typecheck` separately and skip duplicate
// Next.js type checks to keep test builds fast. Production/Docker builds
diff --git a/web/package.json b/web/package.json
index 9863cad089..2202e97277 100644
--- a/web/package.json
+++ b/web/package.json
@@ -9,7 +9,6 @@
"scripts": {
"build": "INLINE_RUNTIME_CHUNK=false dotenv -e ../.env -- next build && pnpm run build:otel-worker",
"build:test": "INLINE_RUNTIME_CHUNK=false dotenv -e ../.env -- next build --experimental-build-mode compile",
- "build:check": "NEXT_DIST_DIR=.next-check INLINE_RUNTIME_CHUNK=false dotenv -e ../.env -- next build && NEXT_DIST_DIR=.next-check pnpm run build:otel-worker",
"build:otel-worker": "DOCKER_BUILD=1 dotenv -e ../.env -- node scripts/build-otel-ingestion-worker.mjs",
"build:json-parser-worker": "node scripts/build-json-parser-worker.mjs",
"typecheck": "dotenv -e ../.env -- tsc -p tsconfig.json --noEmit --skipLibCheck --incremental --tsBuildInfoFile .tsbuildinfo",
diff --git a/web/scripts/build-otel-ingestion-worker.mjs b/web/scripts/build-otel-ingestion-worker.mjs
index befde1e3bc..3d5fa44a57 100644
--- a/web/scripts/build-otel-ingestion-worker.mjs
+++ b/web/scripts/build-otel-ingestion-worker.mjs
@@ -4,9 +4,8 @@ import path from "node:path";
import { build } from "esbuild";
import Piscina from "piscina";
-const distDir = process.env.NEXT_DIST_DIR || ".next";
const outfile = path.resolve(
- distDir,
+ ".next",
"standalone",
"web",
"otelIngestionWorker.js",
diff --git a/web/src/server/otel/otelIngestionWorkerPool.ts b/web/src/server/otel/otelIngestionWorkerPool.ts
index 760e8f01d4..a439a31bc1 100644
--- a/web/src/server/otel/otelIngestionWorkerPool.ts
+++ b/web/src/server/otel/otelIngestionWorkerPool.ts
@@ -19,7 +19,6 @@ let workerPreloadPromise: Promise<void> | undefined;
const workerQueue = new PQueue({ concurrency: 1 });
function getWorkerFilename(): string {
- const distDir = process.env.NEXT_DIST_DIR || ".next";
const serverEntry = process.argv[1];
const candidates = [
...(serverEntry
@@ -33,7 +32,7 @@ function getWorkerFilename(): string {
path.join(process.cwd(), "web", "otelIngestionWorker.js"),
path.join(
process.cwd(),
- distDir,
+ ".next",
"standalone",
"web",
"otelIngestionWorker.js",
diff --git a/web/tsconfig.json b/web/tsconfig.json
index 7fd438227b..1d4efb756a 100644
--- a/web/tsconfig.json
+++ b/web/tsconfig.json
@@ -30,7 +30,6 @@
"next-env.d.ts",
"next-env.d.ts",
"src",
- "types/global.d.ts",
- ".next-check/types/**/*.ts"
+ "types/global.d.ts"
]
}
diff --git a/web/vitest.config.mts b/web/vitest.config.mts
index 77daec5a8c..67514f8c8e 100644
--- a/web/vitest.config.mts
+++ b/web/vitest.config.mts
@@ -15,7 +15,6 @@ expand(config({ path: "../.env" }));
const sharedExclude = [
"**/node_modules/**",
"**/.next/**",
- "**/.next-check/**",
"**/dist/**",
];
diff --git a/worker/package.json b/worker/package.json
index 6b5e68b351..2d4f23e4f8 100644
--- a/worker/package.json
+++ b/worker/package.json
@@ -19,7 +19,6 @@
"start": "dotenv -e ../.env -- node dist/index.js",
"build": "tsc",
"build:test": "tsc",
- "build:check": "tsc",
"typecheck": "dotenv -e ../.env -- tsc --noEmit --skipLibCheck --incremental --tsBuildInfoFile .tsbuildinfo",
"dev": "dotenv -e ../.env -- tsx watch --clear-screen=false --include '../packages/shared/dist/*' src/index.ts",
"lint": "eslint . --cache --cache-location dist/.eslintcache --max-warnings 0 --concurrency 2",