---
title: "SW10002: Invalid component syntax"
description: "A Vue, Svelte, or Astro component has a syntax error."
image: "https://stillwind.dev/og.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://stillwind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# SW10002: Invalid component syntax

This error occurs when the parser of the framework cannot read a Vue, Svelte, or
Astro component. The message shows the location and the explanation from that
parser.

## Reported

```html
<template><button></template>
```

> SW10002: invalid component syntax: SyntaxError: Element is missing end tag.
> 
> Source format: Vue
> 
> Converter: @vue/language-core@3.3.14

## Fixed

```html
<template><button></button></template>
```

## How to fix

Fix the syntax at the location in the message, as in the example, where the
`<button>` element was not closed.

If the component is valid but its converted script is not, the error is
[SW31004](/docs/errors/SW31004) instead.

Source: https://stillwind.dev/docs/errors/SW10002/index.mdx
