bcrypt 3.0.6 + Node.js 12.8.1 - not compatible? - node.js

I have tons of warnings for installing [bcrypt][1] in my node.js:
$ npm install bcrypt
> bcrypt#3.0.6 install /var/www/html/projects/citizen-sense-dustbox-data-streams/test/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.6/bcrypt_lib-v3.0.6-node-v72-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for bcrypt#3.0.6 and node#12.8.1 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/var/www/html/projects/citizen-sense-dustbox-data-streams/test/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../../nan/nan.h:53,
from ../src/bcrypt_node.cc:1:
../src/bcrypt_node.cc: At global scope:
/home/lau/.cache/node-gyp/12.8.1/include/node/node.h:556:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/home/lau/.cache/node-gyp/12.8.1/include/node/node.h:590:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/bcrypt_node.cc:378:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(bcrypt_lib, init);
^~~~~~~~~~~
In file included from /home/lau/.cache/node-gyp/12.8.1/include/node/node.h:63,
from ../../nan/nan.h:53,
from ../src/bcrypt_node.cc:1:
/home/lau/.cache/node-gyp/12.8.1/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/lau/.cache/node-gyp/12.8.1/include/node/node_object_wrap.h:84:78: required from here
/home/lau/.cache/node-gyp/12.8.1/include/node/v8.h:9853:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lau/.cache/node-gyp/12.8.1/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/home/lau/.cache/node-gyp/12.8.1/include/node/v8.h:9853:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
SOLINK_MODULE(target) Release/obj.target/bcrypt_lib.node
COPY Release/bcrypt_lib.node
COPY /var/www/html/projects/citizen-sense-dustbox-data-streams/test/node_modules/bcrypt/lib/binding/bcrypt_lib.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/www/html/projects/citizen-sense-dustbox-data-streams/test/node_modules/bcrypt/build'
npm notice created a lockfile as package-lock.json. You should commit this file.
+ bcrypt#3.0.6
added 68 packages from 49 contributors and audited 97 packages in 3.525s
found 0 vulnerabilities
I am on node 12.8.1:
$ node -v
v12.8.1
Any ideas what I can do?

Related

bcrypt warnings inside of Docker

Is there some solution to get rid of this warning? Console displays it during the Docker image creating. There are a lot of topics all over the internet and no working solution. Since bcrypt js lib creators think that it's fine to not fixing it for years maybe it's possible to import something manually or anything like that.
Node.js v12
bcrypt v3
Docker v19
> bcrypt#3.0.6 install /usr/src/app/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
make: Entering directory '/usr/src/app/node_modules/bcrypt/build'
CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
In file included from ../src/bcrypt_node.cc:1:
../../nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../../nan/nan.h:2232:62: warning: cast between incompatible function types from 'void (*)(uv_work_t*)' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
In file included from ../../nan/nan.h:53,
from ../src/bcrypt_node.cc:1:
../src/bcrypt_node.cc: At global scope:
/root/.node-gyp/12.4.0/include/node/node.h:556:43: warning: cast between incompatible function types from 'void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)' {aka 'void (*)(v8::Local<v8::Object>)'} to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/root/.node-gyp/12.4.0/include/node/node.h:590:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/bcrypt_node.cc:378:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(bcrypt_lib, init);
^~~~~~~~~~~
In file included from /root/.node-gyp/12.4.0/include/node/node.h:63,
from ../../nan/nan.h:53,
from ../src/bcrypt_node.cc:1:
/root/.node-gyp/12.4.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/root/.node-gyp/12.4.0/include/node/node_object_wrap.h:84:78: required from here
/root/.node-gyp/12.4.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/12.4.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../nan/nan_object_wrap.h:65:61: required from here
/root/.node-gyp/12.4.0/include/node/v8.h:9817:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]```
the warning is there for a reason, if you want to hide it, you have few choices
submit a fix to upstream to actually fix the code to remove the warning
hide it by submitting a fix to upstream and add -Wno-cast-function-type to gcc. it's up to maintainer to accept it.
submit a fix to upstream to add prebuilt binary for node 12 so that you won't have to compile every time (hence it won't trigger gcc to build). right now looks like only windows have prebuilt binary for node 12 (search for v72-linux)
https://github.com/kelektiv/node.bcrypt.js/releases/tag/v3.0.6
Are you able to use bycryptjs to avoid this issue?
The bycrypt entirely depends on the node version. Or you have to choose the suitable version of bycrypt or downgrade the version of bycrypt

npm install fails due to "error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessCheckCallbacks"

I just got started on frontend development and followed different React tutorials which included instructions to configure the dependencies. I'm quite overwhelmed by the mass of boilerplate files which are necessary to produce a simple "Hello world!" project.Now, I'm stuck for hours with
> npm install
npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/1627/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
> contextify#0.1.15 install /home/richter/mereet/mereet-frontend/node_modules/contextify
> node-gyp rebuild
make: Verzeichnis „/home/richter/mereet/mereet-frontend/node_modules/contextify/build“ wird betreten
CXX(target) Release/obj.target/contextify/src/contextify.o
In file included from ../src/contextify.cc:3:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2232:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
../src/contextify.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE ContextifyContext::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/contextify.cc:62:74: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
ContextifyContext* ctx = new ContextifyContext(info[0]->ToObject());
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE ContextifyContext::Run(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/contextify.cc:77:48: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<String> code = info[0]->ToString();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10248:15: note: declared here
Local<String> Value::ToString() const {
^~~~~
../src/contextify.cc:83:51: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
ScriptOrigin origin(info[1]->ToString());
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10248:15: note: declared here
Local<String> Value::ToString() const {
^~~~~
../src/contextify.cc: In static member function ‘static v8::Local<v8::Context> ContextWrap::createV8Context(v8::Local<v8::Object>)’:
../src/contextify.cc:131:68: error: no matching function for call to ‘v8::Function::NewInstance()’
Local<Object> wrapper = Nan::New(constructor)->NewInstance();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:4105:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^~~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h:4105:44: note: candidate expects 3 arguments, 0 provided
/home/richter/.node-gyp/11.9.0/include/node/v8.h:4108:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
^~~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h:4108:44: note: candidate expects 1 argument, 0 provided
../src/contextify.cc:150:16: error: ‘class v8::ObjectTemplate’ has no member named ‘SetAccessCheckCallbacks’; did you mean ‘SetAccessCheckCallback’?
otmpl->SetAccessCheckCallbacks(GlobalPropertyNamedAccessCheck,
^~~~~~~~~~~~~~~~~~~~~~~
SetAccessCheckCallback
../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertyGetter(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&)’:
../src/contextify.cc:176:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> data = info.Data()->ToObject();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc:182:80: error: no matching function for call to ‘v8::Object::GetRealNamedProperty(v8::Local<v8::String>&)’
Local<Value> rv = Nan::New(ctx->sandbox)->GetRealNamedProperty(property);
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3668:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedProperty(
^~~~~~~~~~~~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3668:43: note: candidate expects 2 arguments, 1 provided
../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertySetter(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&)’:
../src/contextify.cc:192:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> data = info.Data()->ToObject();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertyQuery(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&)’:
../src/contextify.cc:203:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> data = info.Data()->ToObject();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc:209:67: error: no matching function for call to ‘v8::Object::GetRealNamedProperty(v8::Local<v8::String>&)’
if (!Nan::New(ctx->sandbox)->GetRealNamedProperty(property).IsEmpty() ||
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3668:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedProperty(
^~~~~~~~~~~~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3668:43: note: candidate expects 2 arguments, 1 provided
../src/contextify.cc:210:71: error: no matching function for call to ‘v8::Object::GetRealNamedProperty(v8::Local<v8::String>&)’
!Nan::New(ctx->proxyGlobal)->GetRealNamedProperty(property).IsEmpty()) {
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3668:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::GetRealNamedProperty(v8::Local<v8::Context>, v8::Local<v8::Name>)’
V8_WARN_UNUSED_RESULT MaybeLocal<Value> GetRealNamedProperty(
^~~~~~~~~~~~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3668:43: note: candidate expects 2 arguments, 1 provided
../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertyDeleter(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&)’:
../src/contextify.cc:218:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> data = info.Data()->ToObject();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc:224:63: warning: ‘bool v8::Object::Delete(v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations]
bool success = Nan::New(ctx->sandbox)->Delete(property);
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/v8.h:26,
from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:3442:43: note: declared here
V8_DEPRECATED("Use maybe version", bool Delete(Local<Value> key));
^~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8config.h:326:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
../src/contextify.cc: In static member function ‘static void ContextWrap::GlobalPropertyEnumerator(const Nan::PropertyCallbackInfo<v8::Array>&)’:
../src/contextify.cc:229:52: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<Object> data = info.Data()->ToObject();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE ContextifyScript::New(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/contextify.cc:286:48: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local<String> code = info[0]->ToString();
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10248:15: note: declared here
Local<String> Value::ToString() const {
^~~~~
../src/contextify.cc:291:52: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
? info[1]->ToString()
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10248:15: note: declared here
Local<String> Value::ToString() const {
^~~~~
../src/contextify.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE ContextifyScript::RunInContext(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/contextify.cc:319:62: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
if (!ContextifyContext::InstanceOf(info[0]->ToObject()))
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
../src/contextify.cc:322:95: warning: ‘v8::Local<v8::Object> v8::Value::ToObject() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
ContextifyContext* ctx = Nan::ObjectWrap::Unwrap<ContextifyContext>(info[0]->ToObject());
^
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:10254:15: note: declared here
Local<Object> Value::ToObject() const {
^~~~~
In file included from ../src/contextify.cc:1:
../src/contextify.cc: At global scope:
/home/richter/.node-gyp/11.9.0/include/node/node.h:495:43: warning: cast between incompatible function types from ‘void (*)(v8::Local<v8::Object>)’ to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/home/richter/.node-gyp/11.9.0/include/node/node.h:529:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/contextify.cc:361:5: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(contextify, init)
^~~~~~~~~~~
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’:
/home/richter/.node-gyp/11.9.0/include/node/node_object_wrap.h:85:78: required from here
/home/richter/.node-gyp/11.9.0/include/node/v8.h:9707:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’:
../../nan/nan_object_wrap.h:66:61: required from here
/home/richter/.node-gyp/11.9.0/include/node/v8.h:9707:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
In file included from ../../nan/nan.h:2718,
from ../src/contextify.cc:3:
../../nan/nan_weak.h: In instantiation of ‘Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = ContextWrap; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<ContextWrap>&)]’:
../../nan/nan_weak.h:264:12: required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = ContextWrap; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<ContextWrap>&); Nan::WeakCallbackType = v8::WeakCallbackType]’
../src/contextify.cc:136:132: required from here
../../nan/nan_weak.h:58:16: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class v8::Persistent<v8::Value>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/richter/.node-gyp/11.9.0/include/node/node.h:63,
from ../src/contextify.cc:1:
/home/richter/.node-gyp/11.9.0/include/node/v8.h:784:35: note: ‘class v8::Persistent<v8::Value>’ declared here
template <class T, class M> class Persistent : public PersistentBase<T> {
^~~~~~~~~~
/home/richter/.node-gyp/11.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::WeakCallbackInfo<ContextWrap>; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::WeakCallbackInfo<ContextWrap> >&)]’:
../../nan/nan_weak.h:268:35: required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = ContextWrap; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<ContextWrap>&); Nan::WeakCallbackType = v8::WeakCallbackType]’
../src/contextify.cc:136:132: required from here
/home/richter/.node-gyp/11.9.0/include/node/v8.h:9707:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::WeakCallbackInfo<ContextWrap> >::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::WeakCallbackInfo<ContextWrap> >&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [contextify.target.mk:101: Release/obj.target/contextify/src/contextify.o] Fehler 1
make: Verzeichnis „/home/richter/mereet/mereet-frontend/node_modules/contextify/build“ wird verlassen
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:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:197:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 4.18.0-15-generic
gyp ERR! command "/snap/node/1627/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/richter/mereet/mereet-frontend/node_modules/contextify
gyp ERR! node -v v11.9.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: contextify#0.1.15 (node_modules/contextify):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: contextify#0.1.15 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
audited 35891 packages in 16.281s
found 2 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
which I get on Ubuntu 18.10 with an up-to-date installation of NodeJS through snap as well as on the Docker image node:11-slim.
My research goes as far as figuring out that contextify is obsolete because it is already contained in NodeJS. However, I see no connection to this very obscure error.
Due to the relatively high rate of outdated code and whole projects in the "frontend world" (I have a Java backend background), I'm interested in both fixing this issue and a general approach to solving this kind of dependency problems - I fear that solving this specific case will just forward me to the next issue which has been my weekend so far getting started on frontend development.
My search for existing questions and posts outside SO yields a ton of "class ... has no member named", but I can't extract any steps to take from them.

npm install #atom/watcher and dump message

If I run npm install, it will throws me a ton of messages that I don't understand originated from #atom/watcher I think.
$ npm install
> #atom/watcher#1.0.3 install /home/vdegenne/Gits/node/github-fetch-starter/node_modules/#atom/watcher
> node --harmony script/helper/gen-compilation-db.js rebuild
make: Entering directory '/home/vdegenne/Gits/node/github-fetch-starter/node_modules/#atom/watcher/build'
CXX(target) Release/obj.target/watcher/src/binding.o
In file included from ../../../nan/nan.h:192:0,
from ../src/binding.cpp: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:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
bj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:26:0,
from /home/vdegenne/.node-gyp/9.10.1/include/node/node.h:63,
from ../../../nan/nan.h:49,
from ../src/binding.cpp:2:
/home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:3165:29: note: declared here
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
^
/home/vdegenne/.node-gyp/9.10.1/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
CXX(target) Release/obj.target/watcher/src/hub.o
In file included from ../../../nan/nan.h:192:0,
from ../src/hub.cpp: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:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
bj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:26:0,
from /home/vdegenne/.node-gyp/9.10.1/include/node/node.h:63,
from ../../../nan/nan.h:49,
from ../src/hub.cpp:3:
/home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:3165:29: note: declared here
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
^
/home/vdegenne/.node-gyp/9.10.1/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
CXX(target) Release/obj.target/watcher/src/log.o
CXX(target) Release/obj.target/watcher/src/errable.o
CXX(target) Release/obj.target/watcher/src/queue.o
CXX(target) Release/obj.target/watcher/src/lock.o
CXX(target) Release/obj.target/watcher/src/message.o
CXX(target) Release/obj.target/watcher/src/message_buffer.o
CXX(target) Release/obj.target/watcher/src/thread_starter.o
CXX(target) Release/obj.target/watcher/src/thread.o
CXX(target) Release/obj.target/watcher/src/status.o
CXX(target) Release/obj.target/watcher/src/worker/worker_thread.o
CXX(target) Release/obj.target/watcher/src/worker/recent_file_cache.o
CXX(target) Release/obj.target/watcher/src/polling/directory_record.o
CXX(target) Release/obj.target/watcher/src/polling/polled_root.o
CXX(target) Release/obj.target/watcher/src/polling/polling_iterator.o
CXX(target) Release/obj.target/watcher/src/polling/polling_thread.o
CXX(target) Release/obj.target/watcher/src/helper/libuv.o
CXX(target) Release/obj.target/watcher/src/nan/all_callback.o
In file included from ../../../nan/nan.h:192:0,
from ../src/nan/all_callback.cpp: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:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
bj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:26:0,
from /home/vdegenne/.node-gyp/9.10.1/include/node/node.h:63,
from ../../../nan/nan.h:49,
from ../src/nan/all_callback.cpp:3:
/home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:3165:29: note: declared here
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
^
/home/vdegenne/.node-gyp/9.10.1/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
CXX(target) Release/obj.target/watcher/src/nan/functional_callback.o
In file included from ../../../nan/nan.h:192:0,
from ../src/nan/functional_callback.cpp: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:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
bj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:26:0,
from /home/vdegenne/.node-gyp/9.10.1/include/node/node.h:63,
from ../../../nan/nan.h:49,
from ../src/nan/functional_callback.cpp:3:
/home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:3165:29: note: declared here
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
^
/home/vdegenne/.node-gyp/9.10.1/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
CXX(target) Release/obj.target/watcher/src/nan/options.o
In file included from ../../../nan/nan.h:192:0,
from ../src/nan/options.cpp:1:
../../../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:73: warning: ‘v8::Maybe<bool> v8::Object::ForceSet(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated: Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
bj->ForceSet(isolate->GetCurrentContext(), key, value, attribs);
^
In file included from /home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:26:0,
from /home/vdegenne/.node-gyp/9.10.1/include/node/node.h:63,
from ../../../nan/nan.h:49,
from ../src/nan/options.cpp:1:
/home/vdegenne/.node-gyp/9.10.1/include/node/v8.h:3165:29: note: declared here
Maybe<bool> ForceSet(Local<Context> context, Local<Value> key,
^
/home/vdegenne/.node-gyp/9.10.1/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator __attribute__((deprecated(message)))
^~~~~~~~~~
CXX(target) Release/obj.target/watcher/src/helper/common_posix.o
CXX(target) Release/obj.target/watcher/src/worker/linux/pipe.o
CXX(target) Release/obj.target/watcher/src/worker/linux/side_effect.o
CXX(target) Release/obj.target/watcher/src/worker/linux/cookie_jar.o
CXX(target) Release/obj.target/watcher/src/worker/linux/watched_directory.o
CXX(target) Release/obj.target/watcher/src/worker/linux/watch_registry.o
CXX(target) Release/obj.target/watcher/src/worker/linux/linux_worker_platform.o
SOLINK_MODULE(target) Release/obj.target/watcher.node
COPY Release/watcher.node
make: Leaving directory '/home/vdegenne/Gits/node/github-fetch-starter/node_modules/#atom/watcher/build'
npm WARN prepublish-on-install As of npm#5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` for upload-only.
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.
> github-fetch-starter#1.0.0 prepublish /home/vdegenne/Gits/node/github-fetch-starter
> npm run build
> github-fetch-starter#1.0.0 build /home/vdegenne/Gits/node/github-fetch-starter
> tsc
npm WARN github-fetch-starter#1.0.0 No repository field.
added 192 packages from 483 contributors in 21.847s
Why are those messages, how can I prevent this ? I never saw these messages before but I can't know what I did wrong, if I did something wrong ?
These are warnings from compiling the C++ in the #atom/watcher package. It doesn't fail to install so it's safe to say that you can ignore them.
I tried npm install #atom/watcher and the exit status was 0 - echo $? - so successfully installed.

npm install - error This version of node/NAN/v8 requires a C++11 compiler libxmljs#0.18.0 node-gyp rebuild

I'm running CentOS 6.8(Final) using Vagrant/VirtualBox.
GCC compiler version is (v4.4.7)
Node version (latest LTS): v4.4.6
My package.json file has:
{
"name": "njse",
"main": "server.js",
"description": "MyCompany services",
"repository": "",
"license": "",
"dependencies": {
"bunyan": "^1.8.1",
"dns": "^0.2.2",
"express": "~4.0.0",
"express-delay": "~0.1.0",
"libxmljs": "^0.18.0",
"mssql": "^3.3.0",
"ping": "^0.1.10",
"powershell": "^2.0.2",
"q": "^1.4.1",
"q-io": "^1.13.2",
"validatorjs": "^2.0.11",
"xml2js": "^0.4.16"
}
}
While running "npm install" or "sudo ~vagrant/bin/npm install" I'm getting the following errors.
Any ideas what should I do to fix this issue and run "npm install" successfully? Thanks.
Log:(with some truncation of log files to fit the word limit for this post)
[vagrant#localhost my-directory]$ npm install
npm WARN package.json njse# No repository field.
npm WARN package.json njse# No README data
npm WARN package.json njse# No license field.
npm WARN engine dns#0.2.2: wanted: {"node":">= 0.10.0 < 0.11.0"} (current: {"node":"4.4.6","npm":"2.15.5"})
npm WARN engine tomahawk#0.1.6: wanted: {"node":">= 0.8.0 < 0.11.0"} (current: {"node":"4.4.6","npm":"2.15.5"})
npm WARN engine hawk#0.10.2: wanted: {"node":"0.8.x"} (current: {"node":"4.4.6","npm":"2.15.5"})
npm WARN engine sntp#0.1.4: wanted: {"node":"0.8.x"} (current: {"node":"4.4.6","npm":"2.15.5"})
npm WARN engine cryptiles#0.1.3: wanted: {"node":"0.8.x"} (current: {"node":"4.4.6","npm":"2.15.5"})
npm WARN engine boom#0.3.8: wanted: {"node":"0.8.x"} (current: {"node":"4.4.6","npm":"2.15.5"})
npm WARN engine hoek#0.7.6: wanted: {"node":"0.8.x"} (current: {"node":"4.4.6","npm":"2.15.5"})
> dtrace-provider#0.6.0 install /home/vagrant/ws/06272016/my-directory/node_modules/bunyan/node_modules/dtrace-provider
> node scripts/install.js
> libxmljs#0.18.0 install /home/vagrant/ws/06272016/my-directory/node_modules/libxmljs
> node-gyp rebuild
make: Entering directory `/home/vagrant/ws/06272016/my-directory/node_modules/libxmljs/build'
CC(target) Release/obj.target/libxml/vendor/libxml/buf.o
CC(target) Release/obj.target/libxml/vendor/libxml/catalog.o
CC(target) Release/obj.target/libxml/vendor/libxml/xmlschemas.o
CC(target) Release/obj.target/libxml/vendor/libxml/xmlschemastypes.o
CC(target) Release/obj.target/libxml/vendor/libxml/xmlstring.o
CC(target) Release/obj.target/libxml/vendor/libxml/xmlunicode.o
CC(target) Release/obj.target/libxml/vendor/libxml/xmlwriter.o
CC(target) Release/obj.target/libxml/vendor/libxml/xpath.o
In file included from ../vendor/libxml/xpath.c:462:
../vendor/libxml/timsort.h: In function ‘libxml_domnode_tim_sort_collapse’:
../vendor/libxml/timsort.h:405: warning: comparison between signed and unsigned integer expressions
../vendor/libxml/xpath.c: At top level:
../vendor/libxml/trionan.c:218: warning: ‘trio_is_negative’ defined but not used
../vendor/libxml/xpath.c: In function ‘xmlXPathCastNumberToString’:
../vendor/libxml/xpath.c:3197: warning: array subscript is above array bounds
CC(target) Release/obj.target/libxml/vendor/libxml/xpointer.o
AR(target) Release/obj.target/vendor/libxml/xml.a
COPY Release/xml.a
CXX(target) Release/obj.target/xmljs/src/libxmljs.o
In file included from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
In file included from ../src/libxmljs.cc:3:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:336: error: expected unqualified-id before ‘using’
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In constructor ‘v8::MaybeLocal<T>::MaybeLocal()’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:353: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::IsEmpty() const’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:360: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘bool v8::MaybeLocal<T>::ToLocal(v8::Local<S>*) const’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:364: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘bool v8::WeakCallbackInfo<T>::IsFirstPass() const’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:430: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: At global scope:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:469: error: expected unqualified-id before ‘using’
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In constructor ‘v8::Global<T>::Global()’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:790: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In constructor ‘v8::Global<T>::Global(v8::Global<T>&&)’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:815: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘v8::Global<T>& v8::Global<T>::operator=(v8::Global<S>&&)’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:827: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: At global scope:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:852: error: expected unqualified-id before ‘using’
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:1089: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:1095: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:3205: error: ‘nullptr’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘v8::Local<T> v8::MaybeLocal<T>::ToLocalChecked()’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:7164: error: ‘nullptr’ was not declared in this scope
In file included from ../node_modules/nan/nan.h:196,
from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_maybe_43_inl.h: At global scope:
../node_modules/nan/nan_maybe_43_inl.h:13: error: expected unqualified-id before ‘using’
../node_modules/nan/nan_maybe_43_inl.h:16: error: expected unqualified-id before ‘using’
../node_modules/nan/nan_maybe_43_inl.h:19: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:24: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:83: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:91: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:98: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:108: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:114: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:118: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:125: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:130: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:135: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:139: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:145: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:150: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:156: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:162: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:168: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:174: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:180: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:186: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:194: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:201: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:205: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:209: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:213: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:217: error: expected initializer before ‘<’ token
../node_modules/nan/nan_maybe_43_inl.h:223: error: expected initializer before ‘<’ token
In file included from ../node_modules/nan/nan.h:201,
from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_converters.h:14: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan_converters.h:14: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_converters.h:16: error: ISO C++ forbids declaration of ‘Maybe’ with no type
../node_modules/nan/nan_converters.h:16: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_converters.h:26: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:27: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:28: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:29: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:30: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:31: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:32: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:42: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:43: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:44: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:45: error: ‘return_t’ does not name a type
../node_modules/nan/nan_converters.h:46: error: ‘return_t’ does not name a type
In file included from ../node_modules/nan/nan_converters.h:59,
from ../node_modules/nan/nan.h:201,
from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_converters_43_inl.h:18: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Boolean>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:19: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Number>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:20: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::String>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:21: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Object>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:22: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Integer>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:23: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Uint32>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:24: error: ‘return_t’ in class ‘Nan::imp::ToFactory<v8::Int32>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:34: error: ‘return_t’ in class ‘Nan::imp::ToFactory<bool>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:35: error: ‘return_t’ in class ‘Nan::imp::ToFactory<double>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:36: error: ‘return_t’ in class ‘Nan::imp::ToFactory<long int>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:37: error: ‘return_t’ in class ‘Nan::imp::ToFactory<unsigned int>’ does not name a type
../node_modules/nan/nan_converters_43_inl.h:38: error: ‘return_t’ in class ‘Nan::imp::ToFactory<int>’ does not name a type
In file included from ../node_modules/nan/nan.h:202,
from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Integer]’:
../node_modules/nan/nan_new.h:21: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Int32]’:
../node_modules/nan/nan_new.h:28: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: In function ‘v8::Local<T> Nan::imp::To(v8::Local<v8::Integer>) [with T = v8::Uint32]’:
../node_modules/nan/nan_new.h:35: error: no matching function for call to ‘To(v8::Local<v8::Integer>&)’
../node_modules/nan/nan_new.h: At global scope:
../node_modules/nan/nan_new.h:43: error: ISO C++ forbids declaration of ‘MaybeLocal’ with no type
../node_modules/nan/nan_new.h:43: error: expected ‘;’ before ‘<’ token
../node_modules/nan/nan_new.h:75: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:182: error: ‘return_t’ does not name a type
../node_modules/nan/nan_new.h:183: error: ‘return_t’ does not name a type
In file included from ../node_modules/nan/nan_new.h:189,
from ../node_modules/nan/nan.h:202,
from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_implementation_12_inl.h:56: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::Date>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::Function> Nan::imp::Factory<v8::Function>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan_implementation_12_inl.h:90: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static v8::Local<v8::FunctionTemplate> Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>, v8::Local<v8::Signature>)’:
../node_modules/nan/nan_implementation_12_inl.h:118: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan_implementation_12_inl.h: At global scope:
../node_modules/nan/nan_implementation_12_inl.h:197: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::RegExp>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:216: error: ‘return_t’ in
../node_modules/nan/nan_implementation_12_inl.h:275: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:281: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:286: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:347: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::UnboundScript>’ does not name a type
../node_modules/nan/nan_implementation_12_inl.h:354: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::UnboundScript>’ does not name a type
In file included from ../node_modules/nan/nan.h:202,
from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan_new.h:293: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::String>’ does not name a type
../node_modules/nan/nan_new.h:299: error: ‘return_t’ in
../node_modules/nan/nan_new.h:335: error: ‘return_t’ in class ‘Nan::imp::Factory<v8::RegExp>’ does not name a type
In file included from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::Error(const char*)’:
../node_modules/nan/nan.h:661: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowError(const char*)’:
../node_modules/nan/nan.h:661: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::RangeError(const char*)’:
../node_modules/nan/nan.h:662: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowRangeError(const char*)’:
../node_modules/nan/nan.h:662: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::ReferenceError(const char*)’:
../node_modules/nan/nan.h:663: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowReferenceError(const char*)’:
../node_modules/nan/nan.h:663: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::SyntaxError(const char*)’:
../node_modules/nan/nan.h:664: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowSyntaxError(const char*)’:
../node_modules/nan/nan.h:664: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Value> Nan::TypeError(const char*)’:
../node_modules/nan/nan.h:665: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::ThrowTypeError(const char*)’:
../node_modules/nan/nan.h:665: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:673: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:695: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:762: error: expected initializer before ‘<’ token
../node_modules/nan/nan.h:768: error: expected initializer before ‘<’ token
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h: In member function ‘void Nan::Callback::SetFunction(const v8::Local<v8::Function>&)’:
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:3021: error: argument dependent lookup finds ‘class v8::Set’
../node_modules/nan/nan.h:1404: error: in call to ‘Set’
../node_modules/nan/nan.h: In member function ‘void Nan::AsyncWorker::SaveToPersistent(const char*, const v8::Local<v8::Value>&)’:
../node_modules/nan/nan.h:1524: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::AsyncWorker::GetFromPersistent(const char*) const’:
../node_modules/nan/nan.h:1542: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In member function ‘virtual void Nan::AsyncWorker::HandleErrorCallback()’:
../node_modules/nan/nan.h:1576: error: no matching function for call to ‘New(const char*)’
../node_modules/nan/nan.h: In function ‘void Nan::SetMethod(v8::Local<v8::Object>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1896: error: ‘GetFunction’ was not declared in this scope
../node_modules/nan/nan.h:1897: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1908: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetMethod(v8::Local<v8::ObjectTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1919: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetPrototypeMethod(v8::Local<v8::FunctionTemplate>, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:1933: error: ‘class v8::Local<v8::Boolean>’ has no member named ‘ToLocalChecked’
../node_modules/nan/nan.h: In function ‘void Nan::SetAccessor(v8::Local<v8::ObjectTemplate>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute, Nan::imp::Sig)’:
../node_modules/nan/nan.h:1958: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘bool Nan::SetAccessor(v8::Local<v8::Object>, v8::Local<v8::String>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<void>&), v8::Local<v8::Value>, v8::AccessControl, v8::PropertyAttribute)’:
../node_modules/nan/nan.h:2001: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetNamedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(v8::Local<v8::String>, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2049: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetIndexedPropertyHandler(v8::Local<v8::ObjectTemplate>, void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, v8::Local<v8::Value>, const Nan::PropertyCallbackInfo<v8::Value>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Integer>&), void (*)(uint32_t, const Nan::PropertyCallbackInfo<v8::Boolean>&), void (*)(const Nan::PropertyCallbackInfo<v8::Array>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2119: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetCallHandler(v8::Local<v8::FunctionTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2174: error: ‘NewInstance’ was not declared in this scope
../node_modules/nan/nan.h: In function ‘void Nan::SetCallAsFunctionHandler(v8::Local<v8::ObjectTemplate>, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&), v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2196: error: ‘NewInstance’ was not declared in this scope
In file included from ../src/libxmljs.h:7,
from ../src/libxmljs.cc:7:
../node_modules/nan/nan.h: In function ‘void Nan::Export(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE, const char*, void (*)(const Nan::FunctionCallbackInfo<v8::Value>&))’:
../node_modules/nan/nan.h:2223: error: no matching function for call to ‘New(const char*&)’
../node_modules/nan/nan.h:2224: error: ‘GetFunction’ was not declared in this scope
/home/vagrant/.node-gyp/4.4.6/include/node/v8.h:3021: error: argument dependent lookup finds ‘class v8::Set’
../node_modules/nan/nan.h:2224: error: in call to ‘Set’
../node_modules/nan/nan.h: In constructor ‘Nan::Tap::Tap(v8::Local<v8::Value>)’:
../node_modules/nan/nan.h:2231: error: no matching function for call to ‘To(v8::Local<v8::Value>&)’
../src/libxmljs.cc:263: error: ‘Set’ is not a member of ‘Nan’
../src/libxmljs.cc:263: error: no matching function for call to ‘New(const char [7])’
make: *** [Release/obj.target/xmljs/src/libxmljs.o] Error 1
make: Leaving directory `/home/vagrant/ws/06272016/my-directory/node_modules/libxmljs/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/vagrant/tools/node-v4.4.6-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 2.6.32-573.7.1.el6.x86_64
gyp ERR! command "/home/vagrant/tools/node-v4.4.6-linux-x64/bin/node" "/home/vagrant/tools/node-v4.4.6-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/vagrant/ws/06272016/my-directory/node_modules/libxmljs
gyp ERR! node -v v4.4.6
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
> ws#0.4.31 install /home/vagrant/ws/06272016/my-directory/node_modules/dns/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/vagrant/ws/06272016/my-directory/node_modules/dns/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/vagrant/ws/06272016/my-directory/node_modules/dns/node_modules/tomahawk/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
> ws#0.4.31 install /home/vagrant/ws/06272016/my-directory/node_modules/dns/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
make: Entering directory `/home/vagrant/ws/06272016/my-directory/node_modules/dns/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
make: Leaving directory `/home/vagrant/ws/06272016/my-directory/node_modules/dns/node_modules/tomahawk/node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/build'
npm ERR! Linux 2.6.32-573.7.1.el6.x86_64
npm ERR! argv "/home/vagrant/tools/node-v4.4.6-linux-x64/bin/node" "/home/vagrant/bin/npm" "install"
npm ERR! node v4.4.6
npm ERR! npm v2.15.5
npm ERR! code ELIFECYCLE
npm ERR! libxmljs#0.18.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the libxmljs#0.18.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs libxmljs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/vagrant/ws/06272016/my-directory/npm-debug.log
[vagrant#localhost my-directory]$ sudo yum install libxmljs
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: chicago.gaminghost.co
* epel: mirror.oss.ou.edu
* extras: mirrors.adams.net
* updates: centos.pymesolutionsweb.com
No package libxmljs available.
Error: Nothing to do
[vagrant#localhost my-directory]$ which gcc
/usr/bin/gcc
[vagrant#localhost my-directory]$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17)
Tried upgrading/install of gcc using (yum), it says:
Package gcc-4.4.7-17.el6.x86_64 already installed and latest version
One of the post says, I may need to install gcc 4.8 or newer to build binary addons for node 4.x and above? Is that really required, if so, how can I efficiently install gcc 4.8 without breaking anything else? I also see there's devtoolset-3-rebuild version available on CentOS site. devtoolset-2 has KNOWN issues as per the post: https://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos
I had the same error on my Linux server:
> node-gyp rebuild
...
../node_modules/nan/nan.h:43:3: error: #error This version of node/NAN/v8 requires a C++11 compiler
This helped me:
$ scl enable devtoolset-2 bash
We did a mistake and passed .c extension file changing extension of those files to .cpp fixed this issue for us.

How to manually install arpjs module for node.js?

I am trying to install arpjs module... when I try to install it with
npm install arpjs
or
npm install
sudo npm install https://github.com/skepticfx/arpjs.git
I always get this error:
npm WARN lifecycle typechecker#2.0.8~preinstall: cannot run in wd %s %s (wd=%s) typechecker#2.0.8 node ./cyclic.js /usr/lib/node_modules/.staging/typechecker-8e5299d6dc600530516e3f6be254ad7d
socketwatcher#0.2.1 install /usr/lib/node_modules/arpjs/node_modules/socketwatcher
node-gyp rebuild
make: Entering directory /usr/lib/node_modules/arpjs/node_modules/socketwatcher/build'
CXX(target) Release/obj.target/socketwatcher/socket_watcher.o
In file included from ../node_modules/nan/nan_new.h:190:0,
from ../node_modules/nan/nan.h:80,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
../node_modules/nan/nan_implementation_12_inl.h: In static member function ‘static NanIntern::FactoryBase<v8::Signature>::return_t
NanIntern::Factory<v8::Signature>::New(NanIntern::Factory<v8::Signature>::FTH, int, NanIntern::Factory<v8::Signature>::FTH*)’:
../node_modules/nan/nan_implementation_12_inl.h:181:76: error: no matching function for call to ‘v8::Signature::New(v8::Isolate*, NanIntern::Factory<v8::Signature>::FTH&, int&, NanIntern::Factory<v8::Signature>::FTH*&)’
return v8::Signature::New(v8::Isolate::GetCurrent(), receiver, argc, argv);
^
../node_modules/nan/nan_implementation_12_inl.h:181:76: note: candidate is:
In file included from /home/groshev/.node-gyp/5.0.0/include/node/node.h:42:0,
from ../node_modules/nan/nan.h:24,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/home/groshev/.node-gyp/5.0.0/include/node/v8.h:4674:27: note: static v8::Local<v8::Signature> v8::Signature::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)
static Local<Signature> New(
^
/home/groshev/.node-gyp/5.0.0/include/node/v8.h:4674:27: note: candidate expects 2 arguments, 4 provided
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../node_modules/nan/nan.h: At global scope:
../node_modules/nan/nan.h:171:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:166:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:564:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h:564:35: error: expected ‘,’ or ‘...’ before ‘callback’
, node::smalloc::FreeCallback callback
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’:
../node_modules/nan/nan.h:568:50: error: ‘callback’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h:568:60: error: ‘hint’ was not declared in this scope
v8::Isolate::GetCurrent(), data, length, callback, hint);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’:
../node_modules/nan/nan.h:575:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^
../node_modules/nan/nan.h:575:67: note: candidates are:
In file included from ../node_modules/nan/nan.h:25:0,
from ../socket_watcher.hpp:8,
from ../socket_watcher.cpp:5:
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match>
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/home/groshev/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’
In file included from ../socket_watcher.hpp:8:0,
from ../socket_watcher.cpp:5:
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’:
../node_modules/nan/nan.h:579:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), size)’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^
../node_modules/nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’:
../node_modules/nan/nan.h:586:12: error: ‘Use’ is not a member of ‘node::Buffer’
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
^
make: *** [Release/obj.target/socketwatcher/socket_watcher.o] Error 1
make: Leaving directory/usr/lib/node_modules/arpjs/node_modules/socketwatcher/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:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.16.0-52-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/lib/node_modules/arpjs/node_modules/socketwatcher
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:socketwatcher#0.2.1 socketwatcher#0.2.1 install: node-gyp rebuild
npm WARN install:socketwatcher#0.2.1 Exit status 1
/usr/lib
└── (empty)
npm ERR! code 1
so i was thinking to manually download the sorurce form github and install it . But this module is dependent of other modules (ip,mac and pcap).
So how can i do that ?
This issue has been fixed with the latest release of arpjs (1.1.0). Try installing arpjs again using npm install arpjs

Resources