Multiple Peer React versions npm

298 Views Asked by At

I am working on a react-app. At the moment I have installed [email protected] and I have some plugins which need this version of react. Now I wanted also to use react-canvas, which needs [email protected].

The Warning after installing react-canvas is the following: npm WARN [email protected] 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.

1

There are 1 best solutions below

0
On

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...