{"record":{"id":"ad5b30db8656aaeb","repo":"sveltejs/kit","slug":"entrypoint-file-entrypoint-not-found-this-is-p","errorCode":null,"errorMessage":"Entrypoint file ${entrypoint} not found. This is probably a bug in your adapter.","messagePattern":"Entrypoint file (.+?) not found\\. This is probably a bug in your adapter\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/kit/src/core/adapt/builder.js","lineNumber":332,"sourceCode":"\t\t\treturn existsSync(`${config.outDir}/output/server/instrumentation.server.js`);\n\t\t},\n\n\t\tinstrument({\n\t\t\tentrypoint,\n\t\t\tinstrumentation,\n\t\t\tstart = path.join(path.dirname(entrypoint), 'start.js'),\n\t\t\tinitializer,\n\t\t\tmodule = {\n\t\t\t\texports: ['default']\n\t\t\t}\n\t\t}) {\n\t\t\tif (!existsSync(instrumentation)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Instrumentation file ${instrumentation} not found. This is probably a bug in your adapter.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!existsSync(entrypoint)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Entrypoint file ${entrypoint} not found. This is probably a bug in your adapter.`\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!existsSync(initializer)) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Instrumentation initializer ${initializer} not found. This is probably a bug in your adapter.`\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tcopy(entrypoint, start);\n\t\t\tif (existsSync(`${entrypoint}.map`)) {\n\t\t\t\tcopy(`${entrypoint}.map`, `${start}.map`);\n\t\t\t}\n\n\t\t\tconst relative_instrumentation = posixify(\n\t\t\t\tpath.relative(path.dirname(entrypoint), instrumentation)\n\t\t\t);\n\t\t\tconst relative_start = posixify(path.relative(path.dirname(entrypoint), start));","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/kit/src/core/adapt/builder.js#L314-L350","documentation":"Same guard family as [77] but for the entrypoint file: `builder.instrument` verifies the copied entrypoint exists before writing the server start file; its absence indicates the adapter produced an inconsistent build.","triggerScenarios":"`instrument` is called and `existsSync(entrypoint)` is false after the instrumentation check passed.","commonSituations":"Adapter bug or version mismatch between adapter and SvelteKit where the entrypoint was never emitted to the expected location.","solutions":["Update the adapter to match your SvelteKit version","File/report the bug to the adapter maintainers with build logs","Clean the build output directory and retry in case of stale artifacts"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import { existsSync } from 'node:fs';\nif (!existsSync(entrypoint)) {\n  console.error('Entrypoint missing before instrument(); check adapter/SvelteKit versions');\n  return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Clean the server output directory before builds","Keep adapter and SvelteKit versions aligned","Add existsSync pre-checks in custom adapters"],"tags":["sveltekit","adapter","instrumentation","internal"],"backgroundTag":"adapter-contract-violation","analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}