Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Add react-18 as peer dependency. #563

Open

Description

@alihammad-gist

Peer dependencies do not include react-18 which causes installation errors.

❯ npm i flux --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mezzio@1.0.0
npm ERR! Found: react@18.1.0
npm ERR! node_modules/react
npm ERR!   react@"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.0.2 || ^16.0.0 || ^17.0.0" from flux@4.0.3
npm ERR! node_modules/flux
npm ERR!   flux@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Activity

  1. yangshun commented on May 15, 2022

    @yangshun
    Contributor

    The Flux library is no longer being updated and we don't have intentions to make Flux compatible with React 18 as we're still using some UNSAFE_ lifecycle APIs. It's better to just migrate to another store instead if you want to upgrade to React 18.

    Consider using Redux Toolkit, which is pretty good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions