Realm-js: Can't install Realm for react-native

Created on 12 Jun 2018  路  2Comments  路  Source: realm/realm-js

Goals

Install Realm as per https://realm.io/docs/javascript/latest/#getting-started "npm install --save realm" fails

Expected Results

Realm should install as described

Actual Results

Installation failed with compilation errors
CXX(target) Release/obj.target/realm/src/node/node_init.o
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
../src/node/node_class.hpp:306:25: error: no member named 'Callee' in 'v8::FunctionCallbackInfov8::Value'
F(isolate, info.Callee(), info.This(), arguments.size(), arguments.data(), return_value);

10 errors generated.
make: * [Release/obj.target/realm/src/node/node_init.o] 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:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:235:12)
gyp ERR! System Darwin 17.3.0

Steps to Reproduce

Code Sample

Version of Realm and Tooling

  • Realm JS SDK Version: As of June 8, 2018 (Don't know version. Couldn't install it)
  • Node or React Native: Node 10.1.0, react-native 0.55.4
  • Client OS & Version: ? Mac High Sierra 10.13.2
  • Which debugger for React Native: ? N/A
O-Community

Most helpful comment

As noted in #1813 we don't support node 10 yet. We hope that we can work on it once our dependencies' dependencies are updated.

All 2 comments

Faced this issue too (I tried to install every version from 2.8.2 to 2.6.0). I think, that the reason is a combination of MacOS + nodejs 10. Realm repos doesn't contain precompiled versions for node10, that's why node is trying to build them from source:

node-pre-gyp ERR! Tried to download(404): https://static.realm.io/node-pre-gyp/2.8.0/realm-v2.8.0-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Tried to download(undefined): https://static.realm.io/node-pre-gyp/2.8.0/realm-v2.8.0-node-v64-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)

In my case, there is an error:

fatal error: 'util/atomic_shared_ptr.hpp' file not found

I think, that this issue can be a source of solution:
https://github.com/ufal/udpipe/issues/8

Ways to solve

I think that you could try to create precompiled versions for node10.

Version of Realm and Tooling

Realm JS SDK Version: 2.8.2 ~ 2.6.0
Node or React Native: Node 10.4.0, react-native 0.55.4
Client OS & Version: Mac Sierra 10.12.6
Which debugger for React Native: https://github.com/jhen0409/react-native-debugger

As noted in #1813 we don't support node 10 yet. We hope that we can work on it once our dependencies' dependencies are updated.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jmartindivmedianet picture jmartindivmedianet  路  3Comments

bdebout picture bdebout  路  3Comments

fever324 picture fever324  路  4Comments

texas697 picture texas697  路  3Comments

ashah888 picture ashah888  路  3Comments