I'm getting this error while running on iOS Simulator. I tried many solutions but none works.
Error: Cannot find module 'fs-extra'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/realm/scripts/download-realm.js:21:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
Command /bin/sh failed with exit code 1
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Download\ Core /MyProject/ios/build/MyProject/Build/Intermediates.noindex/RealmJS.build/Debug-iphonesimulator/RealmJS.build/Script-F63FF2C51C12462600B3B8E0.sh
Even I tried to run Realm on empty new project but still the issue remains same.
It will be great if anyone encountered this issue.
More information
Realm JavaScript 3.3.0
react-native-cli: 2.0.1
react-native: 0.61.2