Realm-js: Node 11 Support

Created on 26 Nov 2018  路  11Comments  路  Source: realm/realm-js

Goals

As suggested in #2087 I am opening an issue to track Node 11 support.

Expected Results

npm install realm should succeed on node 11

Actual Results


npm install log

error /Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/compiled/node-v67_darwin_x64/realm.node" (not found)
node-pre-gyp http GET https://static.realm.io/node-pre-gyp/2.20.0/realm-v2.20.0-node-v67-darwin-x64.tar.gz
node-pre-gyp http 404 https://static.realm.io/node-pre-gyp/2.20.0/realm-v2.20.0-node-v67-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://static.realm.io/node-pre-gyp/2.20.0/realm-v2.20.0-node-v67-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v67 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://static.realm.io/node-pre-gyp/2.20.0/realm-v2.20.0-node-v67-darwin-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn /usr/bin/python
gyp info spawn args [ '/usr/local/Cellar/node/11.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/Cellar/node/11.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/bvalentine/.node-gyp/11.1.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/bvalentine/.node-gyp/11.1.0',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/Cellar/node/11.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/bvalentine/.node-gyp/11.1.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok 
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  TOUCH Release/obj.target/OpenSSL.stamp
  ACTION binding_gyp_vendored_realm_target_download_realm /Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/vendor/realm-mac-x64
Resolved requirements: { SYNC_SERVER_FOLDER: 'sync',
  SYNC_ARCHIVE: 'realm-sync-node-cocoa-3.13.4.tar.gz',
  SYNC_ARCHIVE_ROOT: 'realm-sync-node-cocoa-3.13.4' }
No lockfile found at the target, proceeding.
Download url: https://static.realm.io/downloads/sync/realm-sync-node-cocoa-3.13.4.tar.gz
Downloading realm-sync-node-cocoa-3.13.4.tar.gz
Extracting realm-sync-node-cocoa-3.13.4.tar.gz => /Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/vendor/realm-mac-x64
Success
  TOUCH Release/obj.target/vendored-realm.stamp
  TOUCH Release/obj.target/realm-core.stamp
  TOUCH Release/obj.target/realm-sync.stamp
  CXX(target) Release/obj.target/object-store/src/object-store/src/binding_callback_thread_observer.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/collection_notifications.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/index_set.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/list.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/object.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/placeholder.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/object_schema.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/object_store.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/results.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/schema.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/shared_realm.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/thread_safe_reference.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_change_builder.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/collection_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/list_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/object_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/primitive_list_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/realm_coordinator.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/results_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/transact_log_handler.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/weak_realm_notifier.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/util/uuid.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/apple/external_commit_helper.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/impl/apple/keychain_helper.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/apple/network_reachability_observer.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/apple/system_configuration.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/partial_sync.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_config.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_manager.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_user.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/sync_session.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/sync_file.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/sync_metadata.o
  CXX(target) Release/obj.target/object-store/src/object-store/src/sync/impl/work_queue.o
  LIBTOOL-STATIC Release/object-store.a
  CXX(target) Release/obj.target/realm/src/js_realm.o
  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:25:
../src/node/node_function.hpp:41:19: error: no member named 'GetCallingContext' in 'v8::Isolate'; did you mean 'GetCurrentContext'?
    if (!isolate->GetCallingContext().IsEmpty()) {
                  ^~~~~~~~~~~~~~~~~
                  GetCurrentContext
/Users/bvalentine/.node-gyp/11.1.0/include/node/v8.h:7721:18: note: 'GetCurrentContext' declared here
  Local GetCurrentContext();
                 ^
1 error 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/Cellar/node/11.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/Cellar/node/11.1.0/bin/node" "/usr/local/Cellar/node/11.1.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/compiled/node-v67_darwin_x64/realm.node" "--module_name=realm" "--module_path=/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/compiled/node-v67_darwin_x64" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v67"
gyp ERR! cwd /Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm
gyp ERR! node -v v11.1.0
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 'node-gyp build --fallback-to-build --module=/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/compiled/node-v67_darwin_x64/realm.node --module_name=realm --module_path=/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/compiled/node-v67_darwin_x64 --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v67' (1)
node-pre-gyp ERR! stack     at ChildProcess. (/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:257:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/11.1.0/bin/node" "/Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/bvalentine/workspace/xoi/VisionNxMobile/node_modules/realm
node-pre-gyp ERR! node -v v11.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok

Steps to Reproduce

$ brew update
$ brew install node
$ npm install realm

Version of Realm and Tooling

  • Realm JS SDK Version: 2.20.0
  • Node or React Native: Node 11.1.0
  • Client OS & Version: Mac OS X 10.14.1
O-Community P-1-Required T-Duplicate

Most helpful comment

@gagangoku We have now released version 5.0.2 that support newer node versions.

All 11 comments

I am currently facing this issue as well. Please help.

What about the new node N-API build which would allow to support any node version ?

@kneth is there a plan to support node-11?

@ReggaePanda We haven't decided yet but we might go after node 12 instead (supporting LTS releases).

Looks like this will have to be Node 12. It will happen though....

Any news? Would be nice to use on node 12

@LuigiMaestrelli I can't give you a precise timeline for this but we plan to support node 12 but not node 11.

Tracking Node 12 support in #2418

+1

I guess this means Realm can't be used for my project then, I see node 10, 11 or 12 are not supported yet.

@gagangoku We have now released version 5.0.2 that support newer node versions.

Was this page helpful?
0 / 5 - 0 ratings