Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3561

BSON v4.5.0 doesn't work with React Native

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • bson-4.5.1
    • Affects Version/s: bson-4.5.0
    • Component/s: BSON
    • Labels:
      None
    • Not Needed

      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

       

       

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            kenneth.geisshirt@mongodb.com Kenneth Geisshirt
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: