Closed jbowen28 closed 1 year ago
Hi @jbowen28, it looks like you have your TS config set with "strict": true
. We are working on updating our types to fully support strict type checking throughout our library, but in the meantime the workaround is to set skipLibCheck
to true
.
"compilerOptions": {
"skipLibCheck": true,
We will keep the following issue up to date with our progress.
Got it. Please keep me updated as this is pretty important.
@jbowen28 We've made a number of TS Strict fixes including the ones you mentioned in your error message. Would you please try out the latest version of @aws-amplify/ui-react
and let us know if you are still getting errors?
npm install @aws-amplify/ui-react@latest
@jbowen28 And anyone else following this issue may be interested in commenting on the Amplify JS RFC around better TypeScript support: https://github.com/aws-amplify/amplify-js/issues/11113
Closing out as these TS errors are fixed now.
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Authenticator
How is your app built?
CRA
What browsers are you seeing the problem on?
Chrome
Please describe your bug.
I am compiling a CRA typescript monorepo project with aws-amplify and @aws-amplify/ui-react components. I am getting the following errors in the @aws-amplify/ui-react component:
I looked at the github code for @aws-amplify/ui-react@4.3.2 and these errors look legitimate.
What's the expected behaviour?
No errors compiling.
Help us reproduce the bug!
Here are the node module dependencies from my package.json file:
Here are the related tsconfig.json files for this monorepo project:
Code Snippet
Additional information and screenshots
I created a similar issue (#3208) about 2 weeks ago and removed the maplibre... module dependencies as @reesscot recommended and added "@babel/plugin-transform-block-scoping": "7.20.5" (to fix issue aws-amplify/amplify-ui#3210) to my root package.json resolutions section. Somehow, that seemed to fix the exact same compiler errors. But 2 weeks and a couple minor/patch versions later, the compiler issues have appeared again.