Skip to content

Gen2: Type instantiation is excessively deep and possibly infinite #2262

Description

@johnpc

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v20.8.1

Amplify CLI Version

0.11.1

What operating system are you using?

Mac

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

Describe the bug

With certain data model settings, I encounter a type error Type instantiation is excessively deep and possibly infinite. which causes my build to fail. I've set up a repo with a model that experiences this failure here: https://github.com/johnpc/amplify-demo-data-type-infinite (see repro steps).

Expected behavior

Build succeeds without type error

Reproduction steps

git clone https://github.com/johnpc/amplify-demo-data-type-infinite
cd amplify-demo-data-type-infinite
npm install
npm run build
# build will fail with "Type instantiation is excessively deep and possibly infinite."

Project Identifier

No response

Log output

Details
# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions