fbt icon indicating copy to clipboard operation
fbt copied to clipboard

React 18 support

Open TJ09 opened this issue 2 years ago • 0 comments

🐛 Bug Report

According to npm, fbt declares a peer dependency on react that ranges from 0.12.0 - 17.x.x. This means it is not possible to adopt React 18 in a project that uses FBT, though in my own testing, forcing npm to install conflicting versions seems to work just fine anyway.

To Reproduce

$ npm init
...
$ npm i [email protected]
$ npm i fbt

Expected behavior

fbt is installed successfully.

Actual behavior

$ npm i [email protected]

added 3 packages, and audited 4 packages in 817ms

found 0 vulnerabilities
$ npm i fbt
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"18.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"0.12.0 - 17.x.x" from [email protected]
npm ERR! node_modules/fbt
npm ERR!   fbt@"*" 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.

envinfo

  Binaries:
    Node: 16.16.0 - /usr/bin/node
    npm: 8.11.0 - /usr/bin/npm
    Watchman: 20220605.192726.0 - /usr/local/bin/watchman

TJ09 avatar Jul 28 '22 19:07 TJ09