It seems that this package only supports TypeScript >= 4.0.0 because the TypeScript factory API was introduced in TypeScript 4.
With the current dependecy declaration, TypeScript 3 is also considered a valid dependency version. This has resulted in an error when I have installed this package in combination with another package that depends on TypeScript 3 (pnpm has opted to use TypeScript 3 too for this package).
Sources for that the TypeScript factory API was introduced in TypeScript 4:
Suggestion for fix
I suggest to change the version constraint for TypeScript to >=4.0.0 <=4.5.0.
How to fix it in a project
For PNPM I have added the following to pnpm-workspace.yaml:
overrides:
"@aws-amplify/codegen-ui-react>typescript": ">=4.0.0 <=4.5.0"
It seems that this package only supports TypeScript >= 4.0.0 because the TypeScript factory API was introduced in TypeScript 4.
With the current dependecy declaration, TypeScript 3 is also considered a valid dependency version. This has resulted in an error when I have installed this package in combination with another package that depends on TypeScript 3 (pnpm has opted to use TypeScript 3 too for this package).
amplify-codegen-ui/packages/codegen-ui-react/package.json
Line 41 in b155d2a
Sources for that the TypeScript factory API was introduced in TypeScript 4:
Suggestion for fix
I suggest to change the version constraint for TypeScript to
>=4.0.0 <=4.5.0.How to fix it in a project
For PNPM I have added the following to pnpm-workspace.yaml: