{"record":{"id":"aec13af27ccb8959","repo":"sveltejs/kit","slug":"detected-platform-name-please-remove-adapter-s","errorCode":null,"errorMessage":"Detected ${platform.name}. Please remove adapter-static options to enable zero-config mode","messagePattern":"Detected (.+?)\\. Please remove adapter-static options to enable zero-config mode","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/adapter-static/index.js","lineNumber":58,"sourceCode":"\t\t\t\t\t);\n\n\t\t\t\t\tbuilder.log(\n\t\t\t\t\t\t`If this doesn't help, you may need to use a different adapter. @sveltejs/adapter-static can only be used for sites that don't need a server for dynamic rendering, and can run on just a static file server.\\n`\n\t\t\t\t\t);\n\n\t\t\t\t\tbuilder.log(`See https://svelte.dev/docs/kit/page-options#prerender for more details\\n`);\n\n\t\t\t\t\tconst error = new Error('Encountered dynamic routes');\n\t\t\t\t\terror.stack = '';\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst platform = platforms.find((platform) => platform.test());\n\n\t\t\tif (platform) {\n\t\t\t\tif (options) {\n\t\t\t\t\tbuilder.log.warn(\n\t\t\t\t\t\t`Detected ${platform.name}. Please remove adapter-static options to enable zero-config mode`\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tbuilder.log.info(`Detected ${platform.name}, using zero-config mode`);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst {\n\t\t\t\tpages = 'build',\n\t\t\t\tassets = pages,\n\t\t\t\tfallback,\n\t\t\t\tprecompress\n\t\t\t} = options ?? platform?.defaults ?? /** @type {import('./index.js').AdapterOptions} */ ({});\n\n\t\t\trmSync(assets, { force: true, recursive: true });\n\t\t\trmSync(pages, { force: true, recursive: true });\n\n\t\t\tbuilder.generateEnvModule();","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/sveltejs/kit/blob/03f1687fe612ce3d2d9131139b5b188d9cf90c64/packages/adapter-static/index.js#L40-L76","documentation":"adapter-static detects hosting platforms (e.g. GitHub Pages, Netlify) and offers a zero-config mode where platform-specific pages/paths are inferred automatically. If explicit adapter-static options are also supplied, they may conflict with the inferred settings, so the adapter warns you to remove them to benefit from zero-config detection.","triggerScenarios":"Calling adapt() with adapter-static while: (1) a known platform environment variable is detected by one of the platform test() predicates, AND (2) non-empty `options` were passed to the adapter.","commonSituations":"Deploying to GitHub Pages with a workflow setting CI env vars while keeping `pages: 'build'` or `fallback` options from an earlier setup; copy-pasted adapter config from a non-platform deployment; migration from manual to zero-config mode left stale options.","solutions":["Remove the options object: use `adapter()` with no arguments so zero-config mode takes over.","If you intentionally need custom options, ignore the warning and keep them (they take precedence).","Set `paths`/`fallback` needs inside netlify.toml / GitHub Pages config instead of adapter options where the platform supports it."],"exampleFix":"// before (svelte.config.js)\nadapter({ pages: 'build', assets: 'build', fallback: undefined })\n// after\nadapter()","handlingStrategy":"validation","validationCode":"const isZeroConfigTarget = !!process.env.GITHUB_ACTIONS || !!process.env.NETLIFY;\nif (isZeroConfigTarget && adapterOptionsProvided) {\n  console.warn('Remove adapter-static options to enable zero-config mode on this platform');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Call adapter() with no arguments when deploying to detected platforms","Keep platform-specific config in the platform's own config file","Remove stale pages/assets/fallback options after migrating to zero-config"],"tags":["adapter-static","adapter","zero-config","build-warning"],"backgroundTag":"conflicting-adapter-options","analyzedSha":"03f1687fe612ce3d2d9131139b5b188d9cf90c64","analyzedAt":"2026-09-02T02:01:50.504Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}