realm / realm-object-server

Tracking of issues related to the Realm Object Server and other general issues not related to the specific SDK's
https://realm.io
293 stars 42 forks source link

Installing Realm Object server Fails on all OS's #435

Closed Martinaude closed 4 years ago

Martinaude commented 4 years ago

So I have been trying to install the Realm Object Server for a few days now on a new install on CentOS 7. It's a VM running on ESXi 6.7.

I keep getting stuck at the same place with the install:

developer@manager ~ % npm install -g realm-object-server npm WARN deprecated @types/winston@2.4.4: This is a stub types definition. winston provides its own type definitions, so you do not need this installed. npm WARN deprecated superagent@3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header). This notice will go away with v5.0.2+ once it is released. npm WARN deprecated uws@10.148.0: New code is available at github.com/uNetworking/uWebSockets.js npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated core-js@1.2.7: core-js@<2.6.8 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2. /Users/developer/.nvm/versions/node/v12.14.1/bin/ros -> /Users/developer/.nvm/versions/node/v12.14.1/lib/node_modules/realm-object-server/dist/cli.js

diskusage@0.2.6 install /Users/developer/.nvm/versions/node/v12.14.1/lib/node_modules/realm-object-server/node_modules/diskusage node-gyp rebuild

CXX(target) Release/obj.target/diskusage/src/main.o ../src/main.cpp:9:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations] obj->Set(Nan::New("available").ToLocalChecked(), Nan::New(static_cast(usage... ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here V8_DEPRECATED("Use maybe version", ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/main.cpp:10:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations] obj->Set(Nan::New("free").ToLocalChecked(), Nan::New(static_cast(usage.free))); ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here V8_DEPRECATED("Use maybe version", ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/main.cpp:11:10: warning: 'Set' is deprecated: Use maybe version [-Wdeprecated-declarations] obj->Set(Nan::New("total").ToLocalChecked(), Nan::New(static_cast(usage.total))); ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3402:3: note: 'Set' has been explicitly marked deprecated here V8_DEPRECATED("Use maybe version", ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED' declarator attribute((deprecated(message))) ^ ../src/main.cpp:26:42: error: no matching conversion for functional-style cast from 'v8::Local' to 'v8::String::Utf8Value' DiskUsage result = GetDiskUsage(v8::String::Utf8Value(info[0])); ^~~~~~~~~ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3046:5: note: candidate constructor not viable: no known conversion from 'v8::Local' to 'const v8::String::Utf8Value' for 1st argument Utf8Value(const Utf8Value&) = delete; ^ /Users/developer/Library/Caches/node-gyp/12.14.1/include/node/v8.h:3039:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided Utf8Value(Isolate isolate, Local obj); ^ ../src/main.cpp:37:6: error: variable has incomplete type 'void' void Init(v8::Handle exports) ^ ../src/main.cpp:37:15: error: no member named 'Handle' in namespace 'v8' void Init(v8::Handle exports)


../src/main.cpp:37:32: error: expected '(' for function-style cast or type construction
void Init(v8::Handle<v8::Object> exports)
                     ~~~~~~~~~~^
../src/main.cpp:37:34: error: use of undeclared identifier 'exports'
void Init(v8::Handle<v8::Object> exports)
                                 ^
../src/main.cpp:37:42: error: expected ';' after top level declarator
void Init(v8::Handle<v8::Object> exports)
                                         ^
                                         ;
3 warnings and 6 errors generated.
make: *** [Release/obj.target/diskusage/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/developer/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 19.2.0
gyp ERR! command "/Users/developer/.nvm/versions/node/v12.14.1/bin/node" "/Users/developer/.nvm/versions/node/v12.14.1/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/developer/.nvm/versions/node/v12.14.1/lib/node_modules/realm-object-server/node_modules/diskusage
gyp ERR! node -v v12.14.1
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
npm WARN deprecated-react-native-listview@0.0.6 requires a peer of react@* but none is installed. You must install peer dependencies yourself.
npm WARN deprecated-react-native-listview@0.0.6 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! diskusage@0.2.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the diskusage@0.2.6 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/developer/.npm/_logs/2020-01-24T06_43_14_917Z-debug.log

Does anybody have any advice on how to successfully install a Realm Object Server? 
I have now tried on Linux, CentOS, & Mac, and can't get any of them working. 

The only one I have been able to get working is using Docker on MacOS. But would like to install this natively on MacOS, Linux or CentOS
bmunkholm commented 4 years ago

Node12 is not supported yet. It has to run on Node10.

imsheth commented 4 years ago

Tried for hours with node 10+, read the above comment and switched to v10.5.0, post that

npm install -g realm-object-server

worked just fine