Closed voonic closed 3 years ago
I have the same issue. I even tried downgrading React-Native version to 0.63.2 and Realm to 10.2.0 but still no luck.
I am able to reproduce it. The problem is that BSON v4.5.0 doesn't work. Unfortunately, Realm JavaScript specifies BSON v4.4.0 or later.
As a workaround, you can remove node_modules/bson
and reinstall BSON using npm install bson@4.4.0
. If you are doing a fresh installation of Realm JavaScript, you can do npm install realm bson@4.4.0
.
We will work together with the BSON team to get the issue solved: https://jira.mongodb.org/browse/NODE-3561
I am able to reproduce it. The problem is that BSON v4.5.0 doesn't work. Unfortunately, Realm JavaScript specifies BSON v4.4.0 or later.
As a workaround, you can remove
node_modules/bson
and reinstall BSON usingnpm install bson@4.4.0
. If you are doing a fresh installation of Realm JavaScript, you can donpm install realm bson@4.4.0
.We will work together with the BSON team to get the issue solved: https://jira.mongodb.org/browse/NODE-3561
Thanks a lot @kneth that worked perfectly
BSON team has already a fix: https://github.com/mongodb/js-bson/pull/455.
BSON 4.4.0 doesn't work for me. Results in the same error as before.
BSON 4.4.0 doesn't work for me. Results in the same error as before.
same for me
Hi, this worked for me. The only I had to do was to install bson 4.4.0, go to bson.browser.umd.js in bson node_modules and copy all the content into node_modules/realm/node_modules/bson/dist/bson.browser.umd.js.
My node version: 14.17.5 npm version: 6.14.14 realm version: ^10.6.1
I don´t know if doing this is correct but it worked.
I hope my English is undertandable
If you are using yarn, you can use selective version resolutions, add below code to your package.json
to make realm use bson v4.4.0 :
"resolutions": {
"realm/bson": "4.4.0"
},
I am able to reproduce it. The problem is that BSON v4.5.0 doesn't work. Unfortunately, Realm JavaScript specifies BSON v4.4.0 or later.
As a workaround, you can remove
node_modules/bson
and reinstall BSON usingnpm install bson@4.4.0
. If you are doing a fresh installation of Realm JavaScript, you can donpm install realm bson@4.4.0
.We will work together with the BSON team to get the issue solved: https://jira.mongodb.org/browse/NODE-3561
This works, Thanks a ton.
@HanifAnnurRahman
If you are using yarn
Thank you for explaining how to do it when you are a yarn user.
BSON 4.5.1 has been released.
How frequently does the bug occur?
All the time
Description
Not able to run the project for both android and ios
Stacktrace & log output
Can you reproduce the bug?
Yes, always
Reproduction Steps
npm install realm
Version
10.6.1
What SDK flavour are you using?
Local Database only
Are you using encryption?
No, not using encryption
Platform OS and version(s)
Ios, Android
Build environment
Which debugger for React Native: .. "dependencies": { "@react-native-community/netinfo": "^6.0.0", "@react-navigation/material-bottom-tabs": "^6.0.4", "@react-navigation/native": "^6.0.2", "@react-navigation/stack": "^6.0.6", "@types/react-native-vector-icons": "^6.4.8", "native-base": "^3.0.7", "react": "17.0.1", "react-native": "0.64.1", "react-native-fast-image": "^8.3.7", "react-native-flash-message": "^0.1.23", "react-native-gesture-handler": "^1.10.3", "react-native-linear-gradient": "^2.5.6", "react-native-paper": "^4.9.2", "react-native-safe-area-context": "^3.3.0", "react-native-screens": "^3.5.0", "react-native-star-rating": "^1.1.0", "react-native-svg": "^12.1.1", "react-native-vector-icons": "^8.1.0", "realm": "^10.6.1", "styled-components": "^5.3.0", "styled-system": "^5.1.5" }