Flux not compiling with React 18

609 Views Asked by At

Flux is not working with react 18. Error is:

npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.2 || ^16.0.0 || ^17.0.0" from [email protected]

What is the official strategy to resolve this error?

2

There are 2 best solutions below

0
monim On BEST ANSWER

Flux library is no longer being updated and not compatible with React 18 . just migrate to another store instead or downgrade react version.

there are many more sophisticated alternatives available (e.g. Redux...) check it in the flux library

1
saravana kumar On

use npm install flux --legacy-peer-deps