redux-form#8.3.7 requires a peer of react#^16.4.2 but none is installed - reactjs

I have got a problem when I tried to install redux form:
redux-form#8.3.7 requires a peer of react#^16.4.2 but none is installed. You must install peer dependencies yourself.
according to my package.json, I already installed React 17.0.1, so why this warning is still there? Although my app works but the redux form does not work correctly.I am thinking if the lack of peer is where the issue comes from.
I hope someone could help me, thanks!

Related

How to use previous version of libraries for old version of React.js, how to avoid peer dependencies?

Just wanted to know sometimes we have to use older version of react, so could somebody please provide some simple solution
Please provide some simple solution
You can either specify the peer dependencies in package.json, or lookup the peer dependencies based on the react version and then running
npm install [package-name]#[version-number]
for example, if I need to install an old version of prisma, say prisma version 3.2.0, I would have to run the following command in-console:
npm install prisma#3.2.0

Installing private react package gives error due to peer dependencies

I am trying to create and publish a private library of reusable UI components. From what I could find on the web, it is best practice to include react and react-dom as peerDependencies to allow the user installing the package to decide whether which version of react to choose (this makes sense).
But whenever I do try to install it, I get an error:
Could not resolve dependency:
peer react#"^16.8.6" from #xyz/xyz#1.0.1
More so it says that react version found is react#undefined. Which makes sense because it is added in peerDependency.
Any advice on how to approach this?
Solved the issue,
I had wrongly configured the configuration .npmrc file. Fixed it by correcting the scope registry.

Multiple Peer React versions npm

I am working on a react-app. At the moment I have installed react#17.0.0 and I have some plugins which need this version of react. Now I wanted also to use react-canvas, which needs react#15.0.0.
The Warning after installing react-canvas is the following:
npm WARN react-canvas#1.3.0 requires a peer of react#^15.0.0 but none is installed. You must install peer dependencies yourself.
Is it possible to define multiple react versions or something like that? Because I can't downgrade react, because of the other plugins and canvas is only running with react version 15.
Generally you have to wait for the plugin's upgrade to support higher version of react, 16.x, 17.x, then update the peerDeps to be 15 || 16 || 17
But based on the plugin status, looks like this plugins is dead, no update any more.
So if it still works with react, good luck, you can ignore the warning...

React-native and react-redux conflict on different version of react

I have a problem on installing react-redux. I copied and pasted the problem here. Is it reasonable to have 2 versions of react-native at the same time in one project?
react-native says :
WARN react-native#0.59.4 requires a peer of react#16.8.3 but none is installed. You must install peer dependencies yourself.
react-redux says :
WARN react-redux#7.0.1 requires a peer of react#^16.8.4 but none is installed. You must install peer dependencies yourself.
by installing 16.8.3, react-redux will look for 16.8.4. on the other side, react-redux does not work with 16.8.3 and required 16.8.4. How to solve the problem?
Ok, I found the reason. 22 hours ago react-redux has updated to 7.0.1 and as its documentation says :The major change for this release is that connect is now implemented using Hooks internally. Because of this, we now require a minimum React version of 16.8.4 or higher. it requires 16.8.4 at least. So the best solution is now to install react-redux version 6.0.1 by:
npm install --save react-redux#6.0.1

react-stepzilla and React 16

I am attempting to make use of react-stepzilla, but am getting an error when I install the package:
react-stepzilla#4.7.2 requires a peer of react#^15.5.4 but none is
installed. You must install peer dependencies yourself.
I am using "react": "^16.5.2",
Is the issue here that stepzilla doesn't support React 16.x? And is there a way around this?
At runtime, I get the error:
ERROR in ./node_modules/react-stepzilla/dist/main.js Module not found:
Error: Can't resolve 'promise' in 'D:\Software
Development\Repositories\GitHub\MyProj\node_modules\react-stepzilla\dist'
# ./node_modules/react-stepzilla/dist/main.js 21:15-33
I also see this in the editor:
Since this question was asked a long time ago, it appears that react-stepzilla has been updated. It now requires a peer dependency of React 16.4.1. If you tried this again today it would probably not be an issue.
It was indeed the peer dependency that was causing the issue. There's no convenient way around that, though there are a few ways of dealing with it. This question has details on how to handle peer dependency version conflicts.

Resources