-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: bson-4.5.0
-
Component/s: BSON
-
None
What problem are you facing?
Realm JavaScript has BSON as a dependency. With the release of BSON 4.5.0, it is not possible to use Realm JavaScript in a React Native app.
What driver and relevant dependency versions are you using?
Realm JavaScript v10.0.0 or later (testing with 10.2.0 and 10.6.1 by users)
BSON 4.5.0 breaks on React Native
Steps to reproduce?
1. react-native init foobar
2. cd foobar
3. npm install bson
4. cd ios && pod install
5. add "import BSON from 'bson'" to index.js
6. react-native run-ios
The exact error message can be found in https://github.com/realm/realm-js/issues/3915 but is essentially:
Unable to resolve module util from /Users/kneth/tmp/issue3915/node_modules/bson/dist/bson.browser.umd.js: util could not be found within the project or in these directories: node_modules ../node_modules