use-pusher icon indicating copy to clipboard operation
use-pusher copied to clipboard

Incompatible with React versions >16

Open tconroy opened this issue 3 years ago • 4 comments

Describe the bug This package seems to be constrained to a React peer dependency if 16.x, making it incompatible with React 17 and 18 codebases.

I could find no reason in the code for this limitation. Any chance we could loosen up the peer dependency constraint to allow newer react projects to use this hook? :)

tconroy avatar May 15 '22 23:05 tconroy

@tconroy If you need to override peer dependencies of your dependencies, npm >v8.3 supports override in package.json as:

{
"dependencies": {},
"devDependencies": {},
"overrides": {
    "@harelpls/use-pusher": {
      "react": "^17.0.2"
    }
  },
}

Naartti avatar Jun 10 '22 11:06 Naartti

As an alternative to @Naartti `s solution, just ignore the legacy peers using:

npm install --save @harelpls/use-pusher --legacy-peer-deps

Hope the dependencies will get updated shortly.

chrisribal avatar Oct 07 '22 20:10 chrisribal

npm install --save @harelpls/use-pusher --legacy-peer-deps

This worked on my local but fails when i push to vercel.

I think i can fork the package and bump the react dependency and make a PR - is anyone accepting PRs these days?

fotoflo avatar Nov 29 '23 09:11 fotoflo

Strange it didn't work:

yarn install v1.22.19 warning ../package.json: No license field [1/5] 🔍 Validating package.json... [2/5] 🔍 Resolving packages... [3/5] 🚚 Fetching packages... error An unexpected error occurred: "https://packages.convoy.com/artifactory/api/npm/npm/react-is/-/react-is-17.0.1.tgz: Request failed "401 Unauthorized"". info If you think this is a bug, please open a bug report with the information provided in "/Users/fotoflo/use-pusher/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

fotoflo avatar Nov 29 '23 13:11 fotoflo