E0142: A template file has no package clause, or another package's
A .vuka.html file starts with its package clause, as a Go file does: the package of its directory (or of the directory's external test package, layouts_test, for that package's templates). Comments may come before it; imports, the main markup and the func templates follow it.
vuka fmt adds a missing clause, and vuka fix templates-package adds it to every template file of a module.
Wrong
html
<!-- layouts/admin.vuka.html -->
<script lang="go">
type Admin struct {
Children ui.Node
}
</script>
<div class="admin">{Children}</div>Right
html
<!-- layouts/admin.vuka.html -->
<script lang="go">
package layouts
import "github.com/vuka-lang/ui/v2"
type Admin struct {
Children ui.Node
}
</script>
<div class="admin">{Children}</div>