react-router-last-location icon indicating copy to clipboard operation
react-router-last-location copied to clipboard

peerDependencies & testing-library for 2.0.1 in package.json are different in github from npm

Open iulianraduat opened this issue 3 years ago • 7 comments

Hi Dawid,

I am using React 17 and the peerDependencies in package.json from here (github) is including it, but the one published in npm registry no (even if they have the same 2.0.1 version).

It will be great to have a new version published in npm registry which also supports React 17 via peerDependencies.

Also you can use the bellow declaration to reduce the peerDependencies:

"peerDependencies": {
    "prop-types": "^15.6.0",
    "react": ">=15.5.4",
    "react-dom": ">=15.5.4",
    "react-router-dom": ">=4.1.1"
},

Many thanks, Iulian

iulianraduat avatar Sep 03 '21 06:09 iulianraduat

@hinok do you think we could get a new version published sometime soon?

I know you mentioned in https://github.com/hinok/react-router-last-location/pull/57#issuecomment-903268891 that you wanted to do some cleanup on the recently made changes, so I'm wondering what the status on this is, and is this what is blocking a release of 2.0.2 (or 2.1.0)?

joealden avatar Oct 04 '21 09:10 joealden

@hinok any update on the above?

joealden avatar Dec 20 '21 13:12 joealden

This poses a problem in my project now.

Addendum: Anyone having this problem right now: you can help yourself by specifying an override for the nested outdated dependency in your package.json. You basically tell npm to ignore the outdated dependency and use the same that your app uses.

{
  // your regular app dependencies
  "dependencies": {
    "react": "^18.0.0",
    "react-dom": "^18.0.0"
  },
  "overrides": {
    // the override can be defined as a reference to the app dependency
    "react": "$react",
    "react-dom": "$react-dom"
  }
}

teetotum avatar Feb 21 '22 13:02 teetotum

Having this problem too.

Cant use [email protected] with react@17. Using NPM 8.1.2 throws an error in the install. Using previous versions of NPM ignores this problem.

npm ERR! Found: [email protected]
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@"^15.5.4 || ^16.0.0" from [email protected]

adefrutoscasado avatar Apr 20 '22 11:04 adefrutoscasado

@hinok any updates? We need a new version with updated react dependencies, please 🙏

anzarsh avatar Apr 20 '22 12:04 anzarsh

+1, this is now causing issues in my project as well. If there are other issues blocking a release perhaps a patch release can be made that only bumps the peerDependencies? (this change: https://github.com/hinok/react-router-last-location/pull/64)

mturley avatar Jun 16 '22 17:06 mturley

I have forked this and fixed some of mentioned peer dep issues in https://www.npmjs.com/package/react-router-last-location-17 as I had some issues with it as well within my project

Stranget0 avatar Jan 09 '23 13:01 Stranget0