question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
adefrutoscasadocommented, Apr 20, 2022

Having this problem too.

Cant use react-router-last-location@2.0.1 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: 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@"^15.5.4 || ^16.0.0" from react-router-last-location@2.0.1

1reaction
joealdencommented, Dec 20, 2021

@hinok any update on the above?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Unable to resolve peer dependency if version contains ...
When resolving a peer dependency that has a ">=" in it's version, npm uses the latest version of that package to compare with...
Read more >
NPM Error when adding package as a peer dependency
I've 2 projects, where I use the same global components, and I decided to create a private npm package, when I moved my...
Read more >
package.json - npm Docs
When this package is installed as a dependency in another package, the file will be linked where it will be available to that...
Read more >
How to make your npm package. Implement your library
This is a wrapper library for “@testing-library/react”. https://github.com/kondows95/react-testing-library-wrapper. 2. Create “tsconfig.json”.
Read more >
Getting Started | React Native Testing Library - Open Source
npm install --save-dev @testing-library/react-native ... Native-specific jest matchers from @testing-library/jest-native package add it to your project: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found