{"record":{"id":"1e637524d39dcbff","repo":"withastro/astro","slug":"could-not-find-server-component-path","errorCode":null,"errorMessage":"Could not find server component path","messagePattern":"Could not find server component path","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/astro/src/runtime/server/render/server-islands.ts","lineNumber":99,"sourceCode":"\t\tdestination.write(`<!--${SERVER_ISLAND_START}-->`);\n\t\t// Render the slots\n\t\tfor (const name in this.slots) {\n\t\t\tif (name === 'fallback') {\n\t\t\t\tawait renderChild(destination, this.slots.fallback(this.result));\n\t\t\t}\n\t\t}\n\t\tdestination.write(\n\t\t\t`<script type=\"module\" data-astro-rerun data-island-id=\"${hostId}\">${islandContent}</script>`,\n\t\t);\n\t}\n\n\tgetComponentPath(): string {\n\t\tif (this.componentPath) {\n\t\t\treturn this.componentPath;\n\t\t}\n\t\tconst componentPath = this.props['server:component-path'];\n\t\tif (!componentPath) {\n\t\t\tthrow new Error(`Could not find server component path`);\n\t\t}\n\t\tthis.componentPath = componentPath;\n\t\treturn componentPath;\n\t}\n\n\tgetComponentExport(): string {\n\t\tif (this.componentExport) {\n\t\t\treturn this.componentExport;\n\t\t}\n\t\tconst componentExport = this.props['server:component-export'];\n\t\tif (!componentExport) {\n\t\t\tthrow new Error(`Could not find server component export`);\n\t\t}\n\t\tthis.componentExport = componentExport;\n\t\treturn componentExport;\n\t}\n\n\tasync getHostId() {","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/astro/src/runtime/server/render/server-islands.ts#L81-L117","documentation":"ServerIslandComponent.getComponentPath reads the internal prop server:component-path, which the compiler injects when compiling a server-island usage (experimental server islands). The prop tells the island host which server route/file to fetch its content from. If it is absent, the host cannot resolve its component and throws this plain Error.","triggerScenarios":"Constructing or rendering ServerIslandComponent manually without the internal props; a build where the compiler transform that injects server:component-path did not run (astro/@astrojs/compiler version skew, or a plugin stripping props); using the internal class instead of the documented server islands API.","commonSituations":"Mismatched astro and @astrojs/compiler versions after a partial upgrade; integrations or custom renderers re-instantiating island hosts; developers poking at the internal ServerIslandComponent export.","solutions":["Reinstall/align dependencies so astro and @astrojs/compiler come from the same release","Use the documented server islands API rather than constructing ServerIslandComponent directly","Disable plugins that transform component props/attributes and rebuild"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// if you must construct island hosts manually, supply the internal props\nconst island = new ServerIslandComponent(result, {\n  'server:component-path': '/src/components/Widget.astro',\n  'server:component-export': 'default',\n}, slots, 'Widget');","typeGuard":"function hasServerIslandProps(props: Record<string, unknown>): boolean {\n  return typeof props['server:component-path'] === 'string';\n}","tryCatchPattern":null,"preventionTips":["Use the documented server islands API instead of the internal ServerIslandComponent class","Keep astro and @astrojs/compiler versions aligned in the lockfile","Avoid plugins that strip or rewrite server:* attributes"],"tags":["astro","server-islands","experimental","internal-props"],"backgroundTag":"server-island-misconfigured","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}