I've tried installing this on Windows, Ubuntu and MacOS. All fail with the same error.
$ npm install
> [email protected] install C:\Workspaces\ThreadLearning\thread-rest\node_modules\realm
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp ERR! Completion callback never invoked!
node-pre-gyp ERR! System Windows_NT 10.0.17134
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Workspaces\\ThreadLearning\\thread-rest\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Workspaces\ThreadLearning\thread-rest\node_modules\realm
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
Which version of node you are using?
In previouse realmjs version node 12 didn't worked for me. Downgrade to node 10 fixed the issue for me.
According to this node-pre-gyp issue, it seems to be mostly network related - can you try installing on a different network?
I having a similar issue here while building my application.
It started to fail without any change on my package.json file.
38757 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build`
38757 verbose stack Exit status 6
38757 verbose stack at EventEmitter.<anonymous> (/Users/vsts/hostedtoolcache/node/10.15.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
38757 verbose stack at EventEmitter.emit (events.js:189:13)
38757 verbose stack at ChildProcess.<anonymous> (/Users/vsts/hostedtoolcache/node/10.15.3/x64/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
38757 verbose stack at ChildProcess.emit (events.js:189:13)
38757 verbose stack at maybeClose (internal/child_process.js:970:16)
38757 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
We are using node version 10 and still facing the problem.
Looks like there was some dependency change that broke node-pre-gyp https://github.com/mapbox/node-pre-gyp/issues/477
I'm facing the same issue right now trying to install Realm on my project.
Which version of node you are using?
In previouse realmjs version
node 12didn't worked for me. Downgrade tonode 10fixed the issue for me.
I guess the common node v12 error is not related. There are different outputs when using Node 10 or 12.
When running on v12.6.0 I get:
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/3.1.0/realm-v3.1.0-node-v72-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
(...)
And after that it errors on the source compile.
When running on v10.11.0:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp ERR! Completion callback never invoked!
node-pre-gyp ERR! System Linux 5.1.11-arch1-1-ARCH
node-pre-gyp ERR! command "/home/*******/.nvm/versions/node/v10.11.0/bin/node" "/home/*******/projects/*******/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /home/*******/projects/*******/node_modules/realm
node-pre-gyp ERR! node -v v10.11.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! <https://github.com/mapbox/node-pre-gyp/issues>
I'm having the same issue
node-pre-gyp ERR! Completion callback never invoked!
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/Users/vsts/.nvm/versions/node/v8.16.1/bin/node" /work/1/s/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/vsts/agent/2.155.1/work/1/s/node_modules/realm
node-pre-gyp ERR! node -v v8.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! This is a bug in node-pre-gyp.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried Node version 12.x and 10.x this did not work
Which version of node you are using?
In previouse realmjs version
node 12didn't worked for me. Downgrade tonode 10fixed the issue for me.
Could you please share the node version ?
Facing same issue !!!!
[email protected] install /Users/vaibhav/Desktop/test/node_modules/realm
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp ERR! Completion callback never invoked!
node-pre-gyp ERR! System Darwin 18.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/vaibhav/Desktop/test/node_modules/realm/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/vaibhav/Desktop/test/node_modules/realm
node-pre-gyp ERR! node -v v10.16.3
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! This is a bug in node-pre-gyp.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR! https://github.com/mapbox/node-pre-gyp/issues
npm ERR! code ELIFECYCLE
npm ERR! errno 6
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/vaibhav/.npm/_logs/2019-09-24T07_08_59_578Z-debug.log
As @markwolff mentioned in mapbox/node-pre-gyp/issues/477
not ideal but a workaround is to manually add "node-pre-gyp": "0.12.0" as a devDev to your package.json
worked for me
Yesterday I had this same error, I have node in version 10.16.3, so today I tried to install with the command _npm install realm --save_ and it worked (Windows 10)
Installing with npm install realm --save using Node.js v10.11.0 on Linux is now working again
This should be fixed now as long as your package-lock.json does not try to install [email protected]: see https://github.com/mapbox/node-pre-gyp/issues/477#issuecomment-534630617
Seems resolved now. Otherwise please provide a repro case. Thanks!
This happens reliably with latest yarn with nodejs v12.6.0 and realm version 2.29.2:
First, 404s:
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/thebigredgeek/Projects/boltsource/customers/tractorsupply/react-native/node_modules/realm/compiled/node-v72_darwin_x64/realm.node" (not found)
node-pre-gyp http GET https://static.realm.io/node-pre-gyp/2.29.2/realm-v2.29.2-node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://static.realm.io/node-pre-gyp/2.29.2/realm-v2.29.2-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://static.realm.io/node-pre-gyp/2.29.2/realm-v2.29.2-node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v72 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.29.2/realm-v2.29.2-node-v72-darwin-x64.tar.gz
And then plentiful gyp errors:
...
../src/node/node_types.hpp:52:42: error: no type named 'NamedPropertyGetterCallback' in namespace 'v8'; did you mean 'IndexPropertyGetterCallback'?
using StringPropertyGetterCallback = v8::NamedPropertyGetterCallback;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexPropertyGetterCallback
../src/node/node_types.hpp:50:11: note: 'IndexPropertyGetterCallback' declared here
using IndexPropertyGetterCallback = Nan::IndexGetterCallback;
^
../src/node/node_types.hpp:53:42: error: no type named 'NamedPropertySetterCallback' in namespace 'v8'; did you mean 'IndexPropertySetterCallback'?
using StringPropertySetterCallback = v8::NamedPropertySetterCallback;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexPropertySetterCallback
../src/node/node_types.hpp:51:11: note: 'IndexPropertySetterCallback' declared here
using IndexPropertySetterCallback = Nan::IndexSetterCallback;
^
../src/node/node_types.hpp:54:50: error: no type named 'NamedPropertyEnumeratorCallback' in namespace 'v8'; did you mean 'IndexedPropertyEnumeratorCallback'?
using StringPropertyEnumeratorCallback = v8::NamedPropertyEnumeratorCallback;
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexedPropertyEnumeratorCallback
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:5788:16: note: 'IndexedPropertyEnumeratorCallback' declared here
typedef void (*IndexedPropertyEnumeratorCallback)(
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:21:
../src/node/node_string.hpp:51:32: error: too few arguments to function call, single argument 'isolate' was not specified
m_str.resize(s->Utf8Length());
~~~~~~~~~~~~~ ^
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2678:3: note: 'Utf8Length' declared here
int Utf8Length(Isolate* isolate) const;
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:21:
../src/node/node_string.hpp:53:18: error: cannot initialize a parameter of type 'v8::Isolate *' with an rvalue of type 'std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::value_type *' (aka 'char *')
s->WriteUtf8(&m_str[0], m_str.size(), 0, flags);
^~~~~~~~~
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2738:26: note: passing argument to parameter 'isolate' here
int WriteUtf8(Isolate* isolate, char* buffer, int length = -1,
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:24:
../src/node/node_object.hpp:33:57: error: no type named 'ExternalOneByteStringResourceImpl' in namespace 'v8'; did you mean 'Nan::ExternalOneByteStringResource'?
node_key = v8::String::NewExternal(isolate, new v8::ExternalOneByteStringResourceImpl(key.data(), key.size()));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nan::ExternalOneByteStringResource
../../nan/nan.h:193:5: note: 'Nan::ExternalOneByteStringResource' declared here
ExternalOneByteStringResource;
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:24:
../src/node/node_object.hpp:33:61: error: allocating an object of abstract class type 'Nan::ExternalOneByteStringResource' (aka 'v8::String::ExternalOneByteStringResource')
node_key = v8::String::NewExternal(isolate, new v8::ExternalOneByteStringResourceImpl(key.data(), key.size()));
^
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2854:25: note: unimplemented pure virtual method 'data' in 'ExternalOneByteStringResource'
virtual const char* data() const = 0;
^
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2856:20: note: unimplemented pure virtual method 'length' in 'ExternalOneByteStringResource'
virtual size_t length() const = 0;
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:24:
../src/node/node_object.hpp:108:40: error: no matching member function for call to 'ToString'
names.push_back(array->Get(i)->ToString());
~~~~~~~~~~~~~~~^~~~~~~~
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2544:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
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/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:7917:18: note: 'GetCurrentContext' declared here
Local<Context> GetCurrentContext();
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:26:
../src/node/node_value.hpp:152:19: error: no matching member function for call to 'ToString'
return value->ToString();
~~~~~~~^~~~~~~~
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2528:44: note: candidate function not viable: requires single argument 'context', but no arguments were provided
V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
^
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:2544:31: note: candidate function not viable: requires single argument 'isolate', but no arguments were provided
Local<String> ToString(Isolate* isolate) const);
^
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:191:23: error: no member named 'SetNamedPropertyHandler' in 'v8::ObjectTemplate'; did you mean 'SetIndexedPropertyHandler'?
instance_tpl->SetNamedPropertyHandler(string_accessor.getter ? string_accessor.getter : get_nonexistent_property, set_property, 0, 0, string_accessor.enumerator);
^~~~~~~~~~~~~~~~~~~~~~~
SetIndexedPropertyHandler
/Users/thebigredgeek/Library/Caches/node-gyp/12.6.0/include/node/v8.h:6323:8: note: 'SetIndexedPropertyHandler' declared here
void SetIndexedPropertyHandler(
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
In file included from ../src/node/node_class.hpp:23:
../src/js_class.hpp:92:17: error: no type named 'StringPropertyGetterCallback' in 'realm::node::Types'
typename T::StringPropertyGetterCallback getter;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/node/node_class.hpp:368:16: note: in instantiation of template class 'realm::js::StringPropertyType<realm::node::Types>' requested here
template<node::StringPropertyType::GetterType F>
^
In file included from ../src/node/node_init.cpp:19:
In file included from ../src/node/node_init.hpp:29:
In file included from ../src/node/node_class.hpp:23:
../src/js_class.hpp:93:17: error: no type named 'StringPropertySetterCallback' in 'realm::node::Types'
typename T::StringPropertySetterCallback setter;
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
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:373:10: error: called object type 'int' is not a function or function pointer
F(isolate, info.This(), property, return_value);
~^
14 errors generated.
Get the same errors as @thebigredgeek with node v12.18.3 (the latest LTS release) and realm version ^3.6.5
Also deleting yarn.lock and installing node-pre-gyp as a dev dependency don't help.
Node v12 is not supported by Realm v3.x as mentioned here: https://github.com/realm/realm-js/issues/2880#issuecomment-628665377
for those who are still suffering from this, I solved this by downgrade my Node.js version to v10.18.0. As suggested by @andrekovac , Realm v3.x doesn't support node12
Most helpful comment
Node v12 is not supported by Realm v3.x as mentioned here: https://github.com/realm/realm-js/issues/2880#issuecomment-628665377