Recently, I started using Electron v5 and it uses Node 12 which is amazing because it brings good features to work with.
Unfortunately, some errors appears when binding this module.
error /Users/slorenzo/Desktop/Development/infinite-io/node_modules/drivelist: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /Users/slorenzo/Desktop/Development/infinite-io/node_modules/drivelist
Output:
prebuild-install WARN install No prebuilt binaries found (target=12.7.0 runtime=node arch=x64 libc= platform=darwin)
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.7.0 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [
gyp info spawn args '/Users/slorenzo/.nvm/versions/node/v12.7.0/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/slorenzo/Desktop/Development/infinite-io/node_modules/drivelist/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/slorenzo/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/slorenzo/.node-gyp/12.7.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/slorenzo/.node-gyp/12.7.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/slorenzo/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/slorenzo/.node-gyp/12.7.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/slorenzo/Desktop/Development/infinite-io/node_modules/drivelist',
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 spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/drivelist/src/drivelist.o
In file included from ../src/drivelist.cpp:17:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:22:1: warning: 'ToBoolean' is deprecated: ToBoolean can never throw. Use Local version. [-Wdeprecated-declarations]
X(Boolean)
^
../../nan/nan_converters_43_inl.h:18:12: note: expanded from macro 'X'
val->To ## TYPE(isolate->GetCurrentContext()) \
^
:207:1: note: expanded from here
ToBoolean
^
/Users/slorenzo/.node-gyp/12.7.0/include/node/v8.h:2530:3: note: 'ToBoolean' has been explicitly marked deprecated here
V8_DEPRECATED("ToBoolean can never throw. Use Local version.",
^
/Users/slorenzo/.node-gyp/12.7.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../src/drivelist.cpp:17:
In file included from ../../nan/nan.h:222:
In file included from ../../nan/nan_converters.h:67:
../../nan/nan_converters_43_inl.h:40:1: warning: 'BooleanValue' is deprecated: BooleanValue can never throw. Use Isolate version. [-Wdeprecated-declarations]
X(bool, Boolean)
^
../../nan/nan_converters_43_inl.h:37:15: note: expanded from macro 'X'
return val->NAME ## Value(isolate->GetCurrentContext()); \
^
:214:1: note: expanded from here
BooleanValue
^
/Users/slorenzo/.node-gyp/12.7.0/include/node/v8.h:2568:3: note: 'BooleanValue' has been explicitly marked deprecated here
V8_DEPRECATED("BooleanValue can never throw. Use Isolate version.",
^
/Users/slorenzo/.node-gyp/12.7.0/include/node/v8config.h:311:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated(message)))
^
In file included from ../src/drivelist.cpp:17:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
return v8::StringObject::New(value).As();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/slorenzo/.node-gyp/12.7.0/include/node/v8.h:5388:3: note: 'New' declared here
static Local New(Isolate* isolate, Local value);
^
In file included from ../src/drivelist.cpp:17:
In file included from ../../nan/nan.h:223:
In file included from ../../nan/nan_new.h:189:
../../nan/nan_implementation_12_inl.h:356:58: error: expected '(' for function-style cast or type construction
return v8::StringObject::New(value).As();
~~~~~~~~~~~~~~~~^
../../nan/nan_implementation_12_inl.h:356:60: error: expected expression
return v8::StringObject::New(value).As();
^
In file included from ../src/drivelist.cpp:17:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistent >'
assert(persistent().IsNearDeath());
~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
In file included from ../src/drivelist.cpp:17:
In file included from ../../nan/nan.h:2722:
../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistent >'
assert(wrap->handle_.IsNearDeath());
~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/assert.h:93:25: note: expanded from macro 'assert'
(__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__, #e) : (void)0)
^
2 warnings and 5 errors generated.
make: *** [Release/obj.target/drivelist/src/drivelist.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/slorenzo/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:266:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/Users/slorenzo/.nvm/versions/node/v12.7.0/bin/node" "/Users/slorenzo/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/slorenzo/Desktop/Development/infinite-io/node_modules/drivelist
Hi.
Recently, I started using Electron v5 and it uses Node 12 which is amazing because it brings good features to work with.
Unfortunately, some errors appears when binding this module.
Is there any way to handle it?