aws / aws-northstar

NorthStar is an open source design system with reusable React components for rapidly prototyping intuitive, meaningful and accessible user experience. It simplifies your work and ensures consistent, predictable user experience at scale for your customers. With NorthStar, you can focus on innovation and do more with less.
https://aws.github.io/aws-northstar
Apache License 2.0
206 stars 37 forks source link

Installation fails for react version 18.2.0 #717

Closed hemalgadhiya closed 1 year ago

hemalgadhiya commented 1 year ago

Describe the bug The installation fails for react version 18.2.0

Versions Which version of aws-northstar npm package is installed? version 1.3.18

Screenshots If applicable, add screenshots to help explain your problem.

Screen Shot 2022-09-22 at 12 02 52 PM

Desktop (please complete the following information):

jessieweiyi commented 1 year ago

Hi @hemalgadhiya,

This issue is related to breaking changes in the major version 18 of @types/react. Some of the dependencies NorthStar is using are still relying on v17.

See: @types/react@18 break @types/styled-components @types/react@18 breaks "everything".

While we are working on NorthStar V2, please check whether you are using React version 17 and use one of the following temporary fixes to suppress the build error: 1) use @ts-ignore for the block; or 2) add resolution to your package.json if you are using yarn:

  "resolutions": {
    "@types/react": "^17",
    "@types/react-dom": "^17"
  },

Thank you.

hemalgadhiya commented 1 year ago

Thanks