segmentio / consent-manager

Drop-in consent management plugin for analytics.js
https://segmentio.github.io/consent-manager/
MIT License
341 stars 144 forks source link

Add support for react 17 #202

Closed stuart-clark-45 closed 2 years ago

stuart-clark-45 commented 2 years ago
npm i @segment/consent-manager
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: myapp@0.0.1
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.10.0" from @segment/consent-manager@5.4.0
npm ERR! node_modules/@segment/consent-manager
npm ERR!   @segment/consent-manager@"*" 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
stuart-clark-45 commented 2 years ago

In my own fork I did this go get around the problem

"peerDependencies": {
    "react": ">=16.10.0",
    "react-dom": ">=16.10.0"
  },
emont01 commented 2 years ago

@stuart-clark-45 I understand react 17 introduced a number of breaking changes, is everything working correctly after you changed peerDependencies?

stuart-clark-45 commented 2 years ago

@emont01 I believe everything is working fine for us 👍