{"record":{"id":"7820651bfab26287","repo":"withastro/astro","slug":"noadapterinstalledserverislands","errorCode":"NoAdapterInstalledServerIslands","errorMessage":"Cannot use server islands without an adapter. Please install and configure the appropriate server adapter for your final deployment.","messagePattern":"Cannot use server islands without an adapter\\. Please install and configure the appropriate server adapter for your final deployment\\.","errorType":"exception","errorClass":"AstroError","httpStatus":null,"severity":"error","filePath":"packages/astro/src/core/server-islands/vite-plugin-server-islands.ts","lineNumber":107,"sourceCode":"\t\t\t},\n\t\t},\n\n\t\ttransform: {\n\t\t\tfilter: {\n\t\t\t\tid: {\n\t\t\t\t\tinclude: [/\\.(astro|mdx)$/, new RegExp(`^${RESOLVED_SERVER_ISLAND_MANIFEST}$`)],\n\t\t\t\t},\n\t\t\t},\n\t\t\tasync handler(_code, id) {\n\t\t\t\tconst info = this.getModuleInfo(id);\n\t\t\t\tconst astro = info ? (info.meta.astro as AstroPluginMetadata['astro']) : undefined;\n\t\t\t\tconst isBuildSsr =\n\t\t\t\t\tcommand === 'build' && this.environment?.name === ASTRO_VITE_ENVIRONMENT_NAMES.ssr;\n\n\t\t\t\tif (astro) {\n\t\t\t\t\tfor (const comp of astro.serverComponents) {\n\t\t\t\t\t\tif (!settings.adapter) {\n\t\t\t\t\t\t\tthrow new AstroError(AstroErrorData.NoAdapterInstalledServerIslands);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst island = serverIslandsState.discover({\n\t\t\t\t\t\t\tresolvedPath: comp.resolvedPath,\n\t\t\t\t\t\t\tlocalName: comp.localName,\n\t\t\t\t\t\t\tspecifier: comp.specifier ?? comp.resolvedPath,\n\t\t\t\t\t\t\timporter: id,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (isBuildSsr && !serverIslandsState.hasReferenceId(comp.resolvedPath)) {\n\t\t\t\t\t\t\tconst referenceId = this.emitFile({\n\t\t\t\t\t\t\t\ttype: 'chunk',\n\t\t\t\t\t\t\t\tid: island.specifier,\n\t\t\t\t\t\t\t\timporter: island.importer,\n\t\t\t\t\t\t\t\tname: island.islandName,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tserverIslandsState.setReferenceId(comp.resolvedPath, referenceId);\n\t\t\t\t\t\t}","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/withastro/astro/blob/d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca/packages/astro/src/core/server-islands/vite-plugin-server-islands.ts#L89-L125","documentation":"Server islands require a deployment adapter, just like SSR. The server-islands Vite plugin throws AstroError code NoAdapterInstalledServerIslands from its handler when a compiled .astro/.mdx module declares a server component (server: prefixed import) but settings.adapter is unset.","triggerScenarios":"Using `import Login from '../Login.vue server:import';` (a server island) in an .astro page while no adapter is configured in astro.config.","commonSituations":"Experimenting with server islands on a project still in static mode; adding `server:` imports before wiring an adapter; CI build with a different config than local.","solutions":["Install and configure an adapter, e.g. `npx astro add node` then set output accordingly.","Remove the `server:` prefix from the import to render it as a normal static/client component.","Confirm settings.adapter is set in the active astro.config (check for config merge issues)."],"exampleFix":"// astro.config.mjs before\nexport default defineConfig({});\n// after\nimport node from '@astrojs/node';\nexport default defineConfig({ output: 'server', adapter: node({ mode: 'standalone' }) });","handlingStrategy":"validation","validationCode":"import config from './astro.config.mjs';\nif (!config.adapter) {\n  throw new Error('A server adapter is required when using server islands (server: imports).');\n}","typeGuard":"import type { AstroIntegration } from 'astro';\nconst hasAdapter = (cfg: { adapter?: AstroIntegration }): boolean => !!cfg.adapter;","tryCatchPattern":null,"preventionTips":["Add an adapter (`astro add node`) before introducing server islands.","Treat `server:` imports as SSR-only and gate them behind adapter config.","Run a CI build to catch missing adapters early."],"tags":["server-islands","ssr","adapter","build"],"backgroundTag":null,"analyzedSha":"d081033d5fe8e8a68c4bbbad4af9d2deb9c74bca","analyzedAt":"2026-08-12T13:37:29.035Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}