wfp / designsystem

World Food Programme User Interface Kit. Developer kit for implementing WFP web style guideline.
http://www.wfp.org/UIGuide
Apache License 2.0
224 stars 103 forks source link

Latest create-react-app relies on react 17.0.2 . UI Kit expects react 16 version #492

Closed othomas closed 2 years ago

othomas commented 2 years ago

When trying to create a new app with the latest create-react-app, it uses react 17.0.2 . In package.json, we see: "react": "^17.0.2" Then if we try to install WFP UI kit with npm install @wfp/ui @wfp/icons --save We have the following error:

npm install @wfp/ui @wfp/icons --save                                                                                                      !2874
npm notice
npm notice New minor version of npm available! 8.1.2 -> 8.3.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.3.0
npm notice Run npm install -g npm@8.3.0 to update!
npm notice
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: scope-react-mockups@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.13.1" from @wfp/ui@1.20.3
npm ERR! node_modules/@wfp/ui
npm ERR!   @wfp/ui@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Even if we can force the installation as I explained in the above error message, it would be good if WFP UI Kit could work with the latest React version

cassandrakesewa commented 2 years ago

react version updated, closing issue now

johnnymcclorey commented 2 years ago

This issue seems to have appeared again with React version 18