Skip to content

E0419: A dependency field the URL binds too ​

A page's unexported field of a type the app provides is a dependency: web injects it as it builds the page, for a folder page, its method handlers, its layouts and guards, and a page-backed island (dependency fields). This field would also bind from the URL — it is named like one of the route's path parameters, tagged url:, or given a URL by its LiveSchema — so it can't say which it is. Reported at start-up.

Wrong ​

html
<!-- pages/stores/[store]/index.vuka.html -->
<script lang="go">
type Index struct {
	store *store.Store // also the path parameter {store}
}
</script>
html
<!-- pages/stores/[store]/index.vuka.html -->
<script lang="go">
type Index struct {
	Store int          // the path parameter {store}
	db    *store.Store // the dependency
}
</script>

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.