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 evaluableFix: Replace dynamic expressions with literal values or const references.
EVL002: Resource Inside Control Flow
Section titled “EVL002: Resource Inside Control Flow”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.
EVL003–EVL004
Section titled “EVL003–EVL004”See Evaluability Rules for details on dynamic property access and non-const spread sources.
EVL005: Block Body in resource() Callback
Section titled “EVL005: Block Body in resource() Callback”Fix: Use an expression body: (props) => ({ ... }).
COR011: Circular Dependency
Section titled “COR011: Circular Dependency”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 literalFix: Import the referenced resource and use its output attribute (e.g., myRole.arn) instead of a hard-coded string.
COR004: Unused Declarable Export
Section titled “COR004: Unused Declarable Export”An exported resource is not referenced by any other resource or output.
src/logging.ts:3:14 warning [COR004] exported declarable "logBucket" is unusedFix: If intentional, suppress with // chant-disable-next-line COR004. Otherwise, remove the unused export or wire it into your stack.
COR007: Missing Required Property
Section titled “COR007: Missing Required Property”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.
COR008: Unknown Property Name
Section titled “COR008: Unknown Property Name”A resource contains a property name not recognized by the lexicon.
src/bucket.ts:6:5 error [COR008] unknown property "bucketNmae" on resource type BucketFix: Check for typos. Use editor autocompletion from the lexicon types to find the correct property name.
COR010: Unused Export (No Consumers)
Section titled “COR010: Unused Export (No Consumers)”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 consumersFix: Remove the unused export, or suppress with // chant-disable-next-line COR010 if it’s intentionally kept for future use.
Unknown Resource Type
Section titled “Unknown Resource Type”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.