Each diagnostic has a code GXnnnn. The code does not change between releases. gx check --json and gx lint --json print the code, the position, the message, a link to the page and, where Gx knows one, a fix.
Each page shows the cause, an example that gives the diagnostic, and the fix.
Files and generated code#
| Code |
Diagnostic |
| GX1000 |
Parse error. |
| GX1001 |
Component file name is not an exported identifier. |
| GX1002 |
Generated code is missing or stale. |
Components and templates#
| Code |
Diagnostic |
| GX2000 |
Type error in an expression. |
| GX2001 |
Missing required prop. |
| GX2002 |
Unknown component. |
| GX2003 |
Unknown attribute or slot. |
| GX2004 |
Static value for a typed prop. |
| GX2005 |
Attribute spread on a component. |
| GX2006 |
Duplicate slot. |
| GX2007 |
Dynamic event attribute. |
| GX2008 |
Fragment free variable. |
| GX2009 |
Loop needs a key. |
| GX2010 |
Signal in a server expression. |
| GX2011 |
Dynamic URL attribute. |
| GX2012 |
Signal instance needs a key. |
| GX2013 |
Value cannot render as text. |
| GX2014 |
Signal needs an initial value. |
| GX2015 |
Component with signals has no top-level HTML element. |
| GX2016 |
img has no alt attribute. |
| GX2017 |
Form control has no label. |
| GX2018 |
Interactive element inside a link or a button. |
| GX2019 |
One id on two elements of a component. |
| GX2020 |
Element in a parent where a browser moves or drops it. |
| GX2021 |
Warning: a heading skips a level. |
| GX2022 |
Two attributes with one name on one element. |
| GX2023 |
Hint: a form of a route type with no key field renders in a loop. |
| GX2024 |
Hint: a password input has a value. |
Routes#
| Code |
Diagnostic |
| GX3000 |
Route field type cannot bind. |
| GX3001 |
Pattern variable has no field. |
| GX3002 |
Path field has no pattern variable. |
| GX3003 |
Route value is not held by any gx.Collect. |
| GX3004 |
Duplicate route pattern. |
| GX3005 |
Route package contents. |
| GX3006 |
Route field has the name of a generated method. |
| GX3007 |
Route type has two key fields, or a key field that cannot bind. |
Actions, signals and client expressions#
| Code |
Diagnostic |
| GX4001 |
No action is registered for a route type. |
| GX4002 |
More than one action is registered for a route type. |
| GX4003 |
No signal is declared for a signal-bound field. |
| GX4004 |
Signal type does not match the action field. |
| GX4005 |
Call is not allowed in a client expression. |
| GX4006 |
Signal or client expression under an adapter with no signals. |
| GX4007 |
Value or operator is not allowed in a client expression. |
| GX4008 |
Signal-bound fields need rules or gx.Unchecked. |
| GX4009 |
Action method cannot be invoked from the client. |
| GX4010 |
Unknown event modifier or special event. |
| GX4011 |
Tool has no description, or an input with no JSON form. |
| GX4012 |
Hint: c.Update takes a component with no fragment. |
| GX4013 |
Optimistic directive has no action, or writes no signal. |
| GX4014 |
Shared signal in a component with no gx.Room prop. |
| GX4015 |
on:topic has no gx.Topic, or no action. |
| GX4016 |
Hint: topic key with no Publish, or Publish with no listener. |
Styles and transitions#
| Code |
Diagnostic |
| GX5001 |
Gx.Enum misses a constant of its type. |
| GX5002 |
Duplicate view-transition-name in one template. |
| GX5003 |
Class string is built at runtime. |
Islands#
| Code |
Diagnostic |
| GX6001 |
Island has no props struct. |
| GX6002 |
Island prop type has no TypeScript mapping. |
| GX6003 |
Widget tag is missing, not valid or used two times. |
| GX6004 |
Unknown island load strategy. |
| GX6005 |
TypeScript error in an island. |
| GX6006 |
Widget input field cannot be an attribute. |
| GX6007 |
Gx.Head in a widget. |
| GX6008 |
Widget route is in a group with no origins. |
| GX6009 |
Origin with cookies is not exact. |
| GX6010 |
Construct that an email cannot hold. |
Security#
| Code |
Diagnostic |
| GX7001 |
Conversion to gx.SafeHTML needs //gx:trusted. |
| GX7002 |
Gx.Secret cannot cross to the client. |
Content#
| Code |
Diagnostic |
| GX8001 |
Frontmatter is malformed or unknown. |
| GX8002 |
Component is not declared in this collection. |
| GX8003 |
Content link or anchor is broken. |
| GX8004 |
Code file or line range is missing. |
Budgets#
| Code |
Diagnostic |
| GX9001 |
Page route is over its budget. |