Skip to content

Error codes reference

ZNTC assigns a unique code to every diagnostic. Click a code for details and a reproduction snippet.

CodeMessage
ZNTC0001Top-level await is not available in the configured target environment
ZNTC0002Top-level await requires ESM output format
ZNTC0003Code splitting requires ESM output format
ZNTC0004Entry path is empty or not found
ZNTC0005preserveModules requires ESM output format
CodeMessage
ZNTC0100Could not resolve import
ZNTC0101Export not found in module
ZNTC0102Circular dependency detected
ZNTC0103Module resolution failed
ZNTC0104Re-export references the module itself (self-cycle)
CodeMessage
ZNTC0200Failed to read file
ZNTC0201Failed to parse JSON
ZNTC0202No loader is configured for this file type
CodeMessage
ZNTC0300’import’ declaration is only allowed in module code
ZNTC0301’import’ declaration must be at the top level
ZNTC0302’import defer/source’ requires a binding
ZNTC0303String literal in import specifier requires ‘as’ binding
ZNTC0304Duplicate import attribute key
ZNTC0305’export’ declaration is only allowed in module code
ZNTC0306’export’ declaration must be at the top level
ZNTC0307String literal cannot be used as local binding in export
ZNTC0308Module source string expected
ZNTC0309’export’ is not allowed in statement position
ZNTC0310’import’ is not allowed in statement position
ZNTC0311’import’ cannot be used with ‘new’
ZNTC0312’import.meta’ is only allowed in module code
ZNTC0313Expected ‘import.meta’, ‘import.source’, or ‘import.defer’
ZNTC0314’import.source’/‘import.defer’ requires arguments
CodeMessage
ZNTC0400Anonymous function declaration cannot be invoked
ZNTC0401Function declaration is not allowed in statement position
ZNTC0402Function declaration is not allowed in statement position in strict mode
ZNTC0403Generator declaration is not allowed in statement position
ZNTC0404Async function declaration is not allowed in statement position
ZNTC0405Class declaration is not allowed in statement position
ZNTC0406Class constructor cannot be a getter, setter, generator, or async
ZNTC0407Class member cannot be named ‘#constructor’
ZNTC0408Class field cannot be named ‘constructor’
ZNTC0409Static class field cannot be named ‘prototype’
ZNTC0410Static class method cannot be named ‘prototype’
ZNTC0411Class expected after decorator
ZNTC0412Class or export expected after decorator
ZNTC0413Labelled function declaration is not allowed in loop body
ZNTC0414Lexical declaration is not allowed in statement position
CodeMessage
ZNTC0500Identifier expected
ZNTC0501Binding pattern expected
ZNTC0502Escaped reserved word cannot be used as identifier
ZNTC0503Escaped reserved word cannot be used as identifier in strict mode
ZNTC0504Reserved word cannot be used as identifier
ZNTC0505Reserved word in strict mode cannot be used as identifier
ZNTC0506Keywords cannot contain escape characters
ZNTC0507’let’ is not allowed as variable name in lexical declaration
ZNTC0508Const declarations must be initialized
ZNTC0509’async’ is not allowed as identifier in for-of left-hand side
ZNTC0510’let’ is not allowed as identifier in for-of left-hand side
ZNTC0511Only a single variable declaration is allowed in a for-in/for-of statement
ZNTC0512For-in/for-of loop variable declaration may not have an initializer
ZNTC0513Rest element must be last element
ZNTC0514Rest element may not have a trailing comma
ZNTC0515Duplicate parameter name
ZNTC0516Private name is not allowed in destructuring pattern
ZNTC0517Invalid assignment target
ZNTC0518Assignment to ‘eval’ or ‘arguments’ is not allowed in strict mode
CodeMessage
ZNTC0600Expression expected
ZNTC0601Unary expression cannot be the left operand of ’**‘
ZNTC0602Cannot mix ’??’ with ’&&’ or '
ZNTC0603Private name is not valid outside of ‘in’ expression
ZNTC0604Private name is not valid as right-hand side of ‘in’ expression
ZNTC0605Private fields cannot be deleted
ZNTC0606Private field access on super is not allowed
ZNTC0620’super’ is not allowed outside of a method
ZNTC0621’super()’ is only allowed in a class constructor
ZNTC0622’super’ cannot be used as the base of an optional chain
ZNTC0607Tagged template cannot be used in optional chain
ZNTC0608Property key expected
ZNTC0609Expected ’:’ after property key
ZNTC0610Invalid shorthand property initializer
ZNTC0611Reserved word cannot be used as shorthand property
ZNTC0612Reserved word in strict mode cannot be used as shorthand property
ZNTC0613’yield’ cannot be used as shorthand property in generator
ZNTC0614’await’ cannot be used as shorthand property in async/module
ZNTC0615Private identifier is not allowed as object property key
ZNTC0616’arguments’ is not allowed in class field initializer
ZNTC0617’arguments’ is not allowed in class static initializer
ZNTC0618String literal contains lone surrogate
ZNTC0619’new.target’ is not allowed outside of functions
CodeMessage
ZNTC0700’return’ outside of function
ZNTC0701’break’ outside of loop or switch
ZNTC0702’continue’ outside of loop
ZNTC0703Only one default clause is allowed in a switch statement
ZNTC0704Case or default expected
ZNTC0705Catch or finally expected
ZNTC0706No line break is allowed after ‘throw’
ZNTC0707Escaped reserved word cannot be used as label
ZNTC0708Escaped reserved word cannot be used as label in strict mode
ZNTC0709Reserved word in strict mode cannot be used as label
CodeMessage
ZNTC0800’with’ is not allowed in strict mode
ZNTC0801Octal literals are not allowed in strict mode
ZNTC0802Octal escape sequences are not allowed in strict mode
ZNTC0803Deleting an identifier is not allowed in strict mode
ZNTC0804”use strict” not allowed in function with non-simple parameters
CodeMessage
ZNTC0900’await’ cannot be used as identifier in this context
ZNTC0901’await’ expression is not allowed in formal parameters
ZNTC0902’await’ is not allowed in class static initializer
ZNTC0903’await’ is not allowed in non-async function in module code
ZNTC0904’await’ is not allowed in arrow function parameters
ZNTC0905’await’ is not allowed in async arrow function parameters
ZNTC0906’yield’ expression is not allowed in formal parameters
ZNTC0907’yield’ is not allowed in arrow function parameters
ZNTC0908Invalid escape sequence in template literal
ZNTC0909Expected template continuation
ZNTC0910JSX tag name expected
ZNTC0911Spread expected
ZNTC0912Type expected
ZNTC0913Expected ‘in’ in mapped type
ZNTC0914Expected ‘type’ after ‘opaque’
ZNTC0915Modifiers cannot appear on index signature parameters
ZNTC0916An index signature parameter cannot have a question mark
ZNTC0917’yield’ is not allowed outside generator function
ZNTC0918TypeScript syntax is not allowed in JavaScript source
CodeMessage
ZNTC1000Identifier has already been declared
ZNTC1001Cannot be used as a binding identifier in strict mode
CodeMessage
ZNTC1100Private field has already been declared
ZNTC1101Private field must be declared in an enclosing class
CodeMessage
ZNTC1200Duplicate export name
ZNTC1201Export is not defined
ZNTC1202Label has already been declared
ZNTC1203Cannot continue to non-loop label
ZNTC1204Undefined label
CodeMessage
ZNTC1300A class may only have one constructor
ZNTC1301Property name proto appears more than once in object literal
ZNTC1302Getter must not have any formal parameters
ZNTC1303Setter must have exactly one formal parameter
ZNTC1400Type reference is not defined in the same file
ZNTC1401Prop type is not supported by codegen
ZNTC1402NativeProps body is not an object literal or known wrapper
ZNTC1403Duplicate component name in schema
ZNTC1404Inheritance / intersection chain exceeds depth limit