{"record":{"id":"8a3dcd14d6ca0724","repo":"sveltejs/svelte","slug":"snippet-without-render-tag","errorCode":"snippet_without_render_tag","errorMessage":"snippet_without_render_tag\nAttempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.\nhttps://svelte.dev/e/snippet_without_render_tag","messagePattern":"snippet_without_render_tag\nAttempted to render a snippet without a `(.+?)` block\\. This would cause the snippet code to be stringified instead of its content being rendered to the DOM\\. To fix this, change `(.+?)` to `(.+?)`\\.\nhttps://svelte\\.dev/e/snippet_without_render_tag","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/svelte/src/internal/shared/errors.js","lineNumber":116,"sourceCode":"\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/missing_context`);\n\t}\n}\n\n/**\n * Attempted to render a snippet without a `{@render}` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change `{snippet}` to `{@render snippet()}`.\n * @returns {never}\n */\nexport function snippet_without_render_tag() {\n\tif (DEV) {\n\t\tconst error = new Error(`snippet_without_render_tag\\nAttempted to render a snippet without a \\`{@render}\\` block. This would cause the snippet code to be stringified instead of its content being rendered to the DOM. To fix this, change \\`{snippet}\\` to \\`{@render snippet()}\\`.\\nhttps://svelte.dev/e/snippet_without_render_tag`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/snippet_without_render_tag`);\n\t}\n}\n\n/**\n * `%name%` is not a store with a `subscribe` method\n * @param {string} name\n * @returns {never}\n */\nexport function store_invalid_shape(name) {\n\tif (DEV) {\n\t\tconst error = new Error(`store_invalid_shape\\n\\`${name}\\` is not a store with a \\`subscribe\\` method\\nhttps://svelte.dev/e/store_invalid_shape`);\n\n\t\terror.name = 'Svelte error';\n\n\t\tthrow error;\n\t} else {\n\t\tthrow new Error(`https://svelte.dev/e/store_invalid_shape`);\n\t}","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/sveltejs/svelte/blob/20b341f10048cf1016a2028ac7eee5595cfef6a5/packages/svelte/src/internal/shared/errors.js#L98-L134","documentation":"In Svelte 5, referencing a snippet as `{snippet}` in markup (instead of `{@render snippet()}`) would stringify the snippet function rather than render its content. Svelte detects this in DEV and instructs you to change `{snippet}` to `{@render snippet()}`, preventing a silent `[object Function]` render.","triggerScenarios":"Writing `{children}` instead of `{@render children()}` in a template; passing a snippet and rendering it bare; migrating from Svelte 4 `<slot/>` and forgetting the `@render` tag.","commonSituations":"Migrating from Svelte 4 `<slot/>` to snippets; forgetting the `@render` tag; treating snippets like reactive values.","solutions":["Change `{snippet}` to `{@render snippet()}`.","If the snippet takes arguments, render them: `{@render snippet(arg)}`."],"exampleFix":"<!-- before -->\n{children}\n<!-- after -->\n{@render children()}","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always render snippets with `{@render snippet()}`.","Run the Svelte compiler/lint to catch bare snippet references.","When migrating `<slot/>`, replace it with `{@render children()}`.","Treat snippets as render-only — never as reactive template values."],"tags":["snippets","render-tag","svelte5","migration","dev-only"],"backgroundTag":null,"analyzedSha":"20b341f10048cf1016a2028ac7eee5595cfef6a5","analyzedAt":"2026-08-12T23:37:30.399Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}