I'm playing with NodeJS and Electron. Using node 10.9.0
and boilerplate named electron-react-boilerplate
.
All of the NodeJS dependencies that I have installed were working correctly, but I need a native module to be installed. The boilerplate docs says to install native modules in the /app
directory and so I did, but it threw me:
../src/binding.cc:619:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::String>(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
~~~~~~ ^
../src/binding.cc:620:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
~~~~~~
I've switched my node version to 8.11.3
with deleting all of the installed node_modules
and package-lock.json
files and installed the native module first - the installation went through.
Then I switched to install my modules in the root directory and I got:
Error: /usr/local/bin/node exited with code 1
Output:
> electron-react-boilerplate@1.0.0 postinstall /Users/nyc/Desktop/Electron/Project/app
> npm run electron-rebuild
> electron-react-boilerplate@1.0.0 electron-rebuild /Users/nyc/Desktop/Electron/Project/app
> node -r babel-register ../internals/scripts/ElectronRebuild.js
Error output:
An unhandled error occurred inside electron-rebuild
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:360:23: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
String::Utf8Value str(in);
^
/Users/nyc/.electron-gyp/iojs-3.0.0-beta.3/deps/v8/include/v8.h:2819:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/nyc/.electron-gyp/iojs-3.0.0-beta.3/deps/v8/include/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/binding.cc:435:23: warning: 'Utf8Value' is deprecated [-Wdeprecated-declarations]
String::Utf8Value str(in);
^
/Users/nyc/.electron-gyp/iojs-3.0.0-beta.3/deps/v8/include/v8.h:2819:5: note: 'Utf8Value' has been explicitly marked deprecated here
V8_DEPRECATED("Use Isolate version",
^
/Users/nyc/.electron-gyp/iojs-3.0.0-beta.3/deps/v8/include/v8config.h:321:29: note: expanded from macro 'V8_DEPRECATED'
declarator __attribute__((deprecated))
^
../src/binding.cc:619:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<v8::String>("endianness").ToLocalChecked(), Nan::New<v8::String>(CheckEndianness()).ToLocalChecked(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
~~~~~~ ^
../src/binding.cc:620:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<v8::String>("NULL").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
~~~~~~ ^
Is there any way I can avoid this error?