Issue
I am trying to build keeweb on CentOS 7, but it seems some NodeJS errors during the compilation:
[root@localhost keeweb]# npm install
npm WARN npm npm does not support Node.js v10.2.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
> iltorb@https://registry.npmjs.org/iltorb/-/iltorb-1.0.13.tgz install /home/bilyes/Desktop/keeweb/node_modules/iltorb
> node-gyp rebuild
make: Entering directory `/home/bilyes/Desktop/keeweb/node_modules/iltorb/build'
CC(target) Release/obj.target/decode/brotli/common/dictionary.o
CC(target) Release/obj.target/decode/brotli/dec/bit_reader.o
CC(target) Release/obj.target/decode/brotli/dec/decode.o
CC(target) Release/obj.target/decode/brotli/dec/huffman.o
CC(target) Release/obj.target/decode/brotli/dec/state.o
CXX(target) Release/obj.target/decode/src/common/allocator.o
In file included from ../../nan/nan.h:190:0,
from ../src/common/allocator.cc:2:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from ../src/common/allocator.cc:2:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:833:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/10.2.1/include/node/node.h:171): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:848:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/10.2.1/include/node/node.h:164): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:863:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/10.2.1/include/node/node.h:157): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../../nan/nan.h:1477:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.node-gyp/10.2.1/include/node/node.h:171): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
make: *** [Release/obj.target/decode/src/common/allocator.o] Error 1
make: Leaving directory `/home/bilyes/Desktop/keeweb/node_modules/iltorb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 3.10.0-693.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bilyes/Desktop/keeweb/node_modules/iltorb
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
> [email protected] install /home/bilyes/Desktop/keeweb/node_modules/keytar
> node-gyp rebuild
make: Entering directory `/home/bilyes/Desktop/keeweb/node_modules/keytar/build'
CXX(target) Release/obj.target/keytar/src/async.o
In file included from ../../nan/nan.h:190:0,
from ../src/async.cc:3:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe<bool> Nan::ForceSet(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’:
../../nan/nan_maybe_43_inl.h:112:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
return obj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
make: *** [Release/obj.target/keytar/src/async.o] Error 1
make: Leaving directory `/home/bilyes/Desktop/keeweb/node_modules/keytar/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 3.10.0-693.el7.x86_64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/bilyes/Desktop/keeweb/node_modules/keytar
gyp ERR! node -v v10.2.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] cd desktop && npm install /home/bilyes/Desktop/keeweb
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/grunt-appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/appdmg):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/iltorb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: iltorb@https://registry.npmjs.org/iltorb/-/iltorb-1.0.13.tgz install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/keytar):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
moved 1 package in 40.458s
[root@localhost keeweb]#
Those are the versions of node
and npm
:
[bilyes@localhost keeweb]$ node -v
v10.2.1
[bilyes@localhost keeweb]$ npm -v
5.6.0
Solution
Downgrading to npm 5.6.1
fixes the building issues, now it compiles fine.
Answered By - H Aßdøµ