question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Realm JavaScript v2.25.0 with React Native 0.59 error

See original GitHub issue

Actual Results

URL not found: https://static.realm.io/node-pre-gyp/2.25.0/realm-v2.25.0-node-v59-darwin-x64.tar.gz

node-pre-gyp WARN Using request for node-pre-gyp https download node-pre-gyp WARN Tried to download(404): https://static.realm.io/node-pre-gyp/2.25.0/realm-v2.25.0-node-v59-darwin-x64.tar.gz node-pre-gyp WARN Pre-built binaries not found for realm@2.25.0 and node@9.11.1 (node-v59 ABI, unknown) (falling back to source compile with node-gyp) TOUCH Release/obj.target/OpenSSL.stamp ACTION binding_gyp_vendored_realm_target_download_realm /Users/edson/projects/reactnative/phrasesv1/node_modules/realm/vendor/realm-mac-x64 internal/modules/cjs/loader.js:550 throw err; ^

Error: Cannot find module ‘https-proxy-agent’ at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15) at Function.Module._load (internal/modules/cjs/loader.js:475:25) at Module.require (internal/modules/cjs/loader.js:598:17) at require (internal/modules/cjs/helpers.js:11:18) at Object.<anonymous> (/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/scripts/download-realm.js:25:25) at Module._compile (internal/modules/cjs/loader.js:654:30) at Object.Module._extensions…js (internal/modules/cjs/loader.js:665:10) at Module.load (internal/modules/cjs/loader.js:566:32) at tryModuleLoad (internal/modules/cjs/loader.js:506:12) at Function.Module._load (internal/modules/cjs/loader.js:498:3) make: *** [/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/vendor/realm-mac-x64] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:180:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) gyp ERR! System Darwin 17.7.0 gyp ERR! command “/usr/local/Cellar/node/9.11.1/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64/realm.node” “–module_name=realm” “–module_path=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64” “–napi_version=3” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v59” gyp ERR! cwd /Users/edson/projects/reactnative/phrasesv1/node_modules/realm gyp ERR! node -v v9.11.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/Cellar/node/9.11.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64/realm.node --module_name=realm --module_path=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59’ (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/edson/projects/reactnative/phrasesv1/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:180:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:936:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) node-pre-gyp ERR! System Darwin 17.7.0 node-pre-gyp ERR! command “/usr/local/Cellar/node/9.11.1/bin/node” “/Users/edson/projects/reactnative/phrasesv1/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build” node-pre-gyp ERR! cwd /Users/edson/projects/reactnative/phrasesv1/node_modules/realm node-pre-gyp ERR! node -v v9.11.1 node-pre-gyp ERR! node-pre-gyp -v v0.11.0 node-pre-gyp ERR! not ok Failed to execute ‘/usr/local/Cellar/node/9.11.1/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64/realm.node --module_name=realm --module_path=/Users/edson/projects/reactnative/phrasesv1/node_modules/realm/compiled/node-v59_darwin_x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v59’ (1) npm WARN jest-resolve@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself. npm WARN jest-resolve-dependencies@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself. npm WARN jest-snapshot@24.5.0 requires a peer of jest-haste-map@^24.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-native-gesture-handler@1.1.0 requires a peer of react-native-web@>= 0.7 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! realm@2.25.0 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the realm@2.25.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Steps to Reproduce

npm i realm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

11reactions
ferrannpcommented, Mar 14, 2019

So this is the thing, if you have (from react-native 0.59.1 template) in your app/build.gradle:

include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]

The app will crash because Realm does not support 64 bits yet. So till it does, you need to change it back to:

include "armeabi-v7a", "x86"
def versionCodes = ["armeabi-v7a":1, "x86":2]
4reactions
fthernancommented, Mar 15, 2019

So this is the thing, if you have (from react-native 0.59.1 template) in your app/build.gradle:

include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]

The app will crash because Realm does not support 64 bits yet. So till it does, you need to change it back to:

include "armeabi-v7a", "x86"
def versionCodes = ["armeabi-v7a":1, "x86":2]

Thank you ferrannp! Also, I had to include in app/build.gradle:

android {
    ...
    defaultConfig {
        ...
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

"Realm Not Configured Correctly" Error when Running a ...
The code is fairly standard, taken from the ReactNative SDK documentation. "Error: Realm was not configured correctly.
Read more >
How to resolve the error on 'react-native start' - Stack Overflow
I just got a similar error for the first time today. It appears in \node_modules\metro-config\src\defaults\blacklist.js , there is an ...
Read more >
invariant violation: module appregistry is not a registered ...
A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle...
Read more >
@realm/react - npm
Start using @realm/react in your project by running `npm i @realm/react`. There are 2 other projects in the npm registry using @realm/react.
Read more >
A problem occurred configuring project app in react native
1. Open your android studio application and select the SDK manager option from the TOOL menu. · 2. Select the latest android SDK...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found