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 react@18.0
$ npm i fbt
Expected behavior
fbt is installed successfully.
Actual behavior
$ npm i react@18.0
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: test@1.0.0
npm ERR! Found: react@18.0.0
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 fbt@1.0.0
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.
🐛 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
Expected behavior
fbt is installed successfully.
Actual behavior
envinfo