Skip to content

Common Errors

EVL001: Expression Not Statically Evaluable

Section titled “EVL001: Expression Not Statically Evaluable”

A resource property contains a function call, method call, or other dynamic expression.

src/bucket.ts:5:3 error [EVL001] expression in property "name" is not statically evaluable

Fix: Replace dynamic expressions with literal values or const references.

A resource declaration is wrapped in if, for, while, switch, or try.

Fix: Move the resource to the top level. Use separate files for different environments.

See Evaluability Rules for details on dynamic property access and non-const spread sources.

Fix: Use an expression body: (props) => ({ ... }).

Fix: Restructure imports to break the cycle by extracting shared types into a separate file.

COR003: String Literal Where Resource Reference Expected

Section titled “COR003: String Literal Where Resource Reference Expected”

A property expects a reference to another resource but received a plain string.

src/api.ts:8:5 error [COR003] property "role" expects a resource reference, got string literal

Fix: Import the referenced resource and use its output attribute (e.g., myRole.arn) instead of a hard-coded string.

An exported resource is not referenced by any other resource or output.

src/logging.ts:3:14 warning [COR004] exported declarable "logBucket" is unused

Fix: If intentional, suppress with // chant-disable-next-line COR004. Otherwise, remove the unused export or wire it into your stack.

A resource is missing a property that the lexicon marks as required.

src/queue.ts:4:14 error [COR007] resource "myQueue" is missing required property "queueName"

Fix: Add the missing property to your resource definition.

A resource contains a property name not recognized by the lexicon.

src/bucket.ts:6:5 error [COR008] unknown property "bucketNmae" on resource type Bucket

Fix: Check for typos. Use editor autocompletion from the lexicon types to find the correct property name.

An exported const value is never imported by any other file in the project.

src/defaults.ts:2:14 warning [COR010] export "legacyTags" has no consumers

Fix: Remove the unused export, or suppress with // chant-disable-next-line COR010 if it’s intentionally kept for future use.

The resource class isn’t recognized by the installed lexicon.

Fix: Check for typos, then update the lexicon (npm update) and run chant update to sync lexicon types.