node-gyp rebuild error while installing node_xslt on Mac - node.js

I have tried to install node_xslt but couldn't fix the issue, here is all I have done : updating homebrew, node.js, npm, deleting .node-gyp, ...
Please help me...
Thank you in advance.
npm install node_xslt
> node_xslt#0.1.9 preinstall /Users/David/node_modules/.staging/node_xslt-4c6485e9
> node-gyp rebuild
CXX(target) Release/obj.target/node_xslt/node_xslt.o
../node_xslt.cc:18:17: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope handlescope;
^
/Users/David/.node-gyp/6.9.2/include/node/v8.h:915:13: note: declared protected here
V8_INLINE HandleScope() {}
^
../node_xslt.cc:19:30: error: member reference type 'Persistent<v8::Value>' is not a pointer; did you mean to use '.'?
Local<Object> obj = value->ToObject();
~~~~~^~
.
../node_xslt.cc:19:32: error: no member named 'ToObject' in 'v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value> >'
Local<Object> obj = value->ToObject();
~~~~~ ^
../node_xslt.cc:26:17: error: calling a protected constructor of class 'v8::HandleScope'
HandleScope handlescope;
^
/Users/David/.node-gyp/6.9.2/include/node/v8.h:915:13: note: declared protected here

Related

Getting error while installing fibers#2.0.2

I'm working on an old node project and while doing npm install I'm getting errors
Node version: v13.8.0
Npm version: 6.14.4
Mac OS Version: 10.15.5
At first, I was getting the X-Code issue that I have fixed after re-installing the X-Code.
The issue seems to be on npm page but no one has replied to it
https://npm.community/t/npm-install-failing-gyp-err-stack-error-make-failed-with-exit-code-2-and-npm-err-failed-at-the-fibers-1-0-15-install-script/8195/2
> fibers#2.0.2 install /Users/cksharma/projects/step-library/some-library/node_modules/fibers
> node build.js || nodejs build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:68:2: error: no template named 'Handle'
Handle<String> NewLatin1String(Isolate* isolate, const char* string) {
^
../src/fibers.cc:69:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:72:2: error: no template named 'Handle'
Handle<String> NewLatin1Symbol(Isolate* isolate, const char* string) {
^
../src/fibers.cc:73:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:94:2: error: no template named 'Handle'
Handle<Object> NewInstance(Isolate* isolate, Local<Function> fn, int argc, Local<Value> argv[]) {
^
../src/fibers.cc:95:10: error: no viable conversion from returned value of type 'Local<v8::Object>' to function return type 'int'
return fn->NewInstance(isolate->GetCurrentContext(), argc, argv).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:104:2: error: no template named 'Handle'
Handle<Number> ToNumber(Local<Value> value) {
^
../src/fibers.cc:105:10: error: no viable conversion from returned value of type 'Local<v8::Number>' to function return type 'int'
return value->ToNumber(Isolate::GetCurrent()->GetCurrentContext()).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:126:58: error: no template named 'Handle'
void Reset(Isolate* isolate, Persistent<T>& persistent, Handle<T> handle) {
^
../src/fibers.cc:139:7: error: variable has incomplete type 'void'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:26: error: use of undeclared identifier 'Handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:33: error: 'T' does not refer to a value
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:138:18: note: declared here
template <class T>
^
../src/fibers.cc:139:36: error: use of undeclared identifier 'handle'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:48: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~ ^
../src/fibers.cc:139:59: error: expected '(' for function-style cast or type construction
void SetInternalPointer(Handle<T> handle, int index, void* val) {
~~~~^
../src/fibers.cc:139:61: error: use of undeclared identifier 'val'
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:139:65: error: expected ';' at end of declaration
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
;
../src/fibers.cc:139:66: error: expected unqualified-id
void SetInternalPointer(Handle<T> handle, int index, void* val) {
^
../src/fibers.cc:143:27: error: use of undeclared identifier 'Handle'
void* GetInternalPointer(Handle<T> handle, int index) {
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/fibers/src/fibers.o] Error 1
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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:321:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.5.0
gyp ERR! command "/usr/local/Cellar/node/13.8.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /Users/cksharma/projects/step-library/step-library/node_modules/fibers
gyp ERR! node -v v13.8.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: nodejs: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! fibers#2.0.2 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers#2.0.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I have tried checking node-fiber github page but didn't find anything useful.
I had this issue because "typescript" was a normal dependency instead of a devDependency, when I move "typescript" as devDependency it worked.

Error building CXX object gnuradio-runtime

I am trying to install a specific version of gnuradio (3.7.10.1). To do so I am not using Pybombs, but I try to do it from source (I am following this).
First I've cloned the github repository, then checkout the appropriate version. It worked fine until I've tried to invoke CMake and build GNU Radio:
mkdir build
cd build
cmake ../
make
During the make, after 6% done, I have the following error:
In file included from /usr/include/c++/7/type_traits:35:0,
from /usr/include/cppunit/tools/StringHelper.h:7,
from /usr/include/cppunit/TestAssert.h:8,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
#error This file requires compiler and library support \
^~~~~
In file included from /usr/include/cppunit/TestAssert.h:8:0,
from /usr/include/cppunit/TestCase.h:6,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/tools/StringHelper.h:22:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:22:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<!std::is_enum<T>::value, std::string>::type toString(const T& x)
^
/usr/include/cppunit/tools/StringHelper.h:31:15: error: ‘enable_if’ in namespace ‘std’ does not name a template type
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
^~~~~~~~~
/usr/include/cppunit/tools/StringHelper.h:31:24: error: expected unqualified-id before ‘<’ token
typename std::enable_if<std::is_enum<T>::value, std::string>::type toString(const T& x)
In file included from /usr/include/cppunit/TestCase.h:6:0,
from /usr/include/cppunit/TestCaller.h:5,
from /usr/include/cppunit/extensions/HelperMacros.h:9,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestAssert.h: In static member function ‘static std::__cxx11::string CppUnit::assertion_traits<T>::toString(const T&)’:
/usr/include/cppunit/TestAssert.h:74:42: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return CPPUNIT_NS::StringHelper::toString(x);
^~~~~~~~
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: At global scope:
/usr/include/cppunit/TestCaller.h:159:37: error: ‘std::function’ has not been declared
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^~~~~~~~
/usr/include/cppunit/TestCaller.h:159:45: error: expected ‘,’ or ‘...’ before ‘<’ token
TestCaller(std::string name, std::function<void()> test_function, Fixture* fixture):
^
/usr/include/cppunit/TestCaller.h:200:8: error: ‘function’ in namespace ‘std’ does not name a template type
std::function<void()> m_test_function;
^~~~~~~~
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod)’:
/usr/include/cppunit/TestCaller.h:121:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, m_fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:121:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, m_fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:121:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, m_fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture&)’:
/usr/include/cppunit/TestCaller.h:138:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, &fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:138:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, &fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:138:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, &fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, CppUnit::TestCaller<Fixture>::TestMethod, Fixture*)’:
/usr/include/cppunit/TestCaller.h:155:6: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function( std::bind(test, fixture) )
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:155:28: error: ‘bind’ is not a member of ‘std’
m_test_function( std::bind(test, fixture) )
^~~~
/usr/include/cppunit/TestCaller.h:155:28: note: suggested alternative: ‘find’
m_test_function( std::bind(test, fixture) )
^~~~
find
/usr/include/cppunit/TestCaller.h: In constructor ‘CppUnit::TestCaller<Fixture>::TestCaller(std::__cxx11::string, int)’:
/usr/include/cppunit/TestCaller.h:162:17: error: ‘fixture’ was not declared in this scope
m_fixture(fixture),
^~~~~~~
/usr/include/cppunit/TestCaller.h:162:17: note: suggested alternative: ‘Fixture’
m_fixture(fixture),
^~~~~~~
Fixture
/usr/include/cppunit/TestCaller.h:163:7: error: class ‘CppUnit::TestCaller<Fixture>’ does not have any field named ‘m_test_function’
m_test_function(test_function)
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:163:23: error: ‘test_function’ was not declared in this scope
m_test_function(test_function)
^~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h: In member function ‘void CppUnit::TestCaller<Fixture>::runTest()’:
/usr/include/cppunit/TestCaller.h:175:7: error: there are no arguments to ‘m_test_function’ that depend on a template parameter, so a declaration of ‘m_test_function’ must be available [-fpermissive]
m_test_function();
^~~~~~~~~~~~~~~
/usr/include/cppunit/TestCaller.h:175:7: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from /usr/include/cppunit/extensions/HelperMacros.h:14:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/extensions/TestNamer.h: In member function ‘std::__cxx11::string CppUnit::TestNamer::getTestNameFor(const string&, const E&) const’:
/usr/include/cppunit/extensions/TestNamer.h:70:95: error: ‘toString’ is not a member of ‘CppUnit::StringHelper’
return getTestNameFor(testMethodName) + " with parameter: " + CPPUNIT_NS::StringHelper::toString(val);
^~~~~~~~
In file included from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h: In static member function ‘static CppUnit::TestSuite* qa_fxpt::suite()’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘unique_ptr’ is not a member of ‘std’
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: expected primary-expression before ‘>’ token
CPPUNIT_TEST_SUITE_END();
^
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:36:3: error: ‘guard’ was not declared in this scope
CPPUNIT_TEST_SUITE_END();
^
In file included from /usr/include/cppunit/extensions/HelperMacros.h:9:0,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.h:26,
from /home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:27:
/usr/include/cppunit/TestCaller.h: In instantiation of ‘void CppUnit::TestCaller<Fixture>::runTest() [with Fixture = qa_fxpt]’:
/home/cofex/workarea/gnuradio/gnuradio-runtime/lib/math/qa_fxpt.cc:102:1: required from here
/usr/include/cppunit/TestCaller.h:175:22: error: ‘m_test_function’ was not declared in this scope
m_test_function();
~~~~~~~~~~~~~~~^~
/usr/include/cppunit/TestCaller.h:175:22: note: suggested alternative: ‘__fortify_function’
m_test_function();
~~~~~~~~~~~~~~~^~
__fortify_function
gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/build.make:62: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o' failed
make[2]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/math/qa_fxpt.cc.o] Error 1
CMakeFiles/Makefile2:726: recipe for target 'gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all' failed
make[1]: *** [gnuradio-runtime/lib/CMakeFiles/test-gnuradio-runtime.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I am not a Linux expert and I am not very familiar to this compiler/library support. I don't really understand where the error comes from and how to correct it.
I use Ubuntu 18.04.
Coud you give me a hand on this please?
Any help would be very appreciated.
Thanks a lot.
/usr/include/c++/7/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
To resolve the above error you need to compile with -std=c++11 flag. Open CMakeLists.txt, find all occurrences or -std=c++98 and change them to -std=c++11. Then go to the build directory, remove CMakeCache.txt and rebuild
sed -i 's/-std=c++98/-std=c++11/g' CMakeLists.txt
cd build
rm CMakeCache.txt
cmake ..
make
Also as the error is in the cppunit and it's used for testing you can try disabling all tests
cd build
rm CMakeCache.txt
cmake -DENABLE_TESTING=OFF ..
make

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

node-gyp rebuild error while installing an npm package

I'm trying to install "karma" and "grunt-karma" for a project and I end up with the following npm error. I'm running MacOS Sierra v10.12.4, XCode v8.3.2 with command line tools installed, node v7.9.0, node-gyp v3.5.0.
Before pasting this here I read all the SO topics about this and also some other ones on GitHub, but nothing worked.
> bufferutil#1.1.0 install /Users/cc/project/node_modules/bufferutil
> node-gyp rebuild
CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
../node_modules/nan/nan_new.h:34:56: warning: 'ToInt32' is deprecated
[-Wdeprecated-declarations]
To<v8::Int32>(v8::Handle<v8::Integer> i) { return i->ToInt32(); }
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:9041:21: note: 'ToInt32'
has been explicitly marked deprecated here
Local<Int32> Value::ToInt32() const {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
../node_modules/nan/nan_new.h:39:56: warning: 'ToUint32' is deprecated
[-Wdeprecated-declarations]
To<v8::Uint32>(v8::Handle<v8::Integer> i) { return i->ToUint32(); }
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:9035:22: note: 'ToUint32'
has been explicitly marked deprecated here
Local<Uint32> Value::ToUint32() const {
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:49:29: warning: 'New' is
deprecated [-Wdeprecated-declarations]
return v8::BooleanObject::New(value).As<v8::BooleanObject>();
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:4490:56: note: 'New' has
been explicitly marked deprecated here
V8_DEPRECATED("Pass an isolate", static Local<Value> New(bool value));
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:166:30: warning: 'Compile' is
deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:173:30: warning: 'Compile' is
deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:205:22: warning:
'NewFromOneByte' is deprecated [-Wdeprecated-declarations]
return v8::String::NewFromOneByte(v8::Isolate::GetCurrent(), value,
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:2544:21: note:
'NewFromOneByte' has been explicitly marked deprecated here
Local<String> NewFromOneByte(Isolate* isolate, const uint8_t* data,
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:217:22: warning: 'NewExternal'
is deprecated [-Wdeprecated-declarations]
return v8::String::NewExternal(v8::Isolate::GetCurrent(), value);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:2582:38: note:
'NewExternal' has been explicitly marked deprecated here
Local<String> NewExternal(
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:237:30: warning:
'CompileUnbound' is deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1356:45: note:
'CompileUnbound' has been explicitly marked deprecated here
Local<UnboundScript> CompileUnbound(
^
In file included from ../src/bufferutil.cc:16:
In file included from ../node_modules/nan/nan.h:82:
In file included from ../node_modules/nan/nan_new.h:189:
../node_modules/nan/nan_implementation_12_inl.h:244:30: warning:
'CompileUnbound' is deprecated [-Wdeprecated-declarations]
return v8::ScriptCompiler::CompileUnbound(v8::Isolate::GetCurrent(), &src);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1356:45: note:
'CompileUnbound' has been explicitly marked deprecated here
Local<UnboundScript> CompileUnbound(
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:261:25: error: redefinition of '_NanEnsureLocal'
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) {
^
../node_modules/nan/nan.h:256:25: note: previous definition is here
NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) {
^
../node_modules/nan/nan.h:289:39: warning: 'IdleNotification' is deprecated
[-Wdeprecated-declarations]
return v8::Isolate::GetCurrent()->IdleNotification(idle_time_in_ms);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:6893:22: note:
'IdleNotification' has been explicitly marked deprecated here
bool IdleNotification(int idle_time_in_ms));
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:473:20: error: no type named 'GCEpilogueCallback' in
'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:479:20: error: no type named 'GCEpilogueCallback' in
'v8::Isolate'
v8::Isolate::GCEpilogueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:484:20: error: no type named 'GCPrologueCallback' in
'v8::Isolate'
v8::Isolate::GCPrologueCallback callback
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:490:20: error: no type named 'GCPrologueCallback' in
'v8::Isolate'
v8::Isolate::GCPrologueCallback callback) {
~~~~~~~~~~~~~^
../node_modules/nan/nan.h:569:15: error: no type named 'WeakCallbackData' in
namespace 'v8'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
~~~~^
../node_modules/nan/nan.h:569:31: error: expected ')'
const v8::WeakCallbackData<T, _NanWeakCallbackInfo<T, P> > &data) {
^
../node_modules/nan/nan.h:568:41: note: to match this '('
static void _NanWeakCallbackDispatcher(
^
../node_modules/nan/nan.h:570:42: error: use of undeclared identifier 'data'
_NanWeakCallbackInfo<T, P> *info = data.GetParameter();
^
../node_modules/nan/nan.h:661:13: error: no member named 'smalloc' in namespace
'node'
, node::smalloc::FreeCallback callback
~~~~~~^
../node_modules/nan/nan.h:672:12: error: no matching function for call to 'New'
return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
^~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:46:40: note:
candidate function not viable: 2nd argument ('const char *') would lose
const qualifier
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:34:40: note:
candidate function not viable: no known conversion from 'const char *' to
'v8::Local<v8::String>' for 2nd argument
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:31:40: note:
candidate function not viable: requires 2 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, size_t length);
^
/Users/cc/.node-gyp/7.9.0/include/node/node_buffer.h:39:40: note:
candidate function not viable: requires 5 arguments, but 3 were provided
NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate,
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:676:12: error: no viable conversion from returned
value of type 'v8::MaybeLocal<v8::Object>' to function return type
'v8::Local<v8::Object>'
return node::Buffer::New(v8::Isolate::GetCurrent(), size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:221:7: note: candidate
constructor (the implicit copy constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'const
v8::Local<v8::Object> &' for 1st argument
class Local {
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:221:7: note: candidate
constructor (the implicit move constructor) not viable: no known
conversion from 'v8::MaybeLocal<v8::Object>' to 'v8::Local<v8::Object> &&'
for 1st argument
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:225:13: note: candidate
template ignored: could not match 'Local' against 'MaybeLocal'
V8_INLINE Local(Local<S> that)
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:683:26: error: no member named 'Use' in namespace
'node::Buffer'
return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size);
~~~~~~~~~~~~~~^
../node_modules/nan/nan.h:710:32: warning: 'Compile' is deprecated
[-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
In file included from ../src/bufferutil.cc:16:
../node_modules/nan/nan.h:717:32: warning: 'Compile' is deprecated
[-Wdeprecated-declarations]
return v8::ScriptCompiler::Compile(v8::Isolate::GetCurrent(), &source);
^
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:1376:21: note: 'Compile'
has been explicitly marked deprecated here
Local<Script> Compile(Isolate* isolate, Source* source,
^
../src/bufferutil.cc:30:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "unmask", BufferUtil::Unmask);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
../src/bufferutil.cc:31:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "mask", BufferUtil::Mask);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
../src/bufferutil.cc:32:5: error: call to 'NODE_SET_METHOD' is ambiguous
NODE_SET_METHOD(t, "merge", BufferUtil::Merge);
^~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:266:25: note: expanded
from macro 'NODE_SET_METHOD'
#define NODE_SET_METHOD node::NODE_SET_METHOD
^~~~~~~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/node.h:241:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Template> recv,
^
/Users/cc/.node-gyp/7.9.0/include/node/node.h:254:13: note: candidate
function
inline void NODE_SET_METHOD(v8::Local<v8::Object> recv,
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Primitive *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:414:12: note: in instantiation of function template
specialization 'v8::Local<v8::Primitive>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::Undefined(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Boolean *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:424:12: note: in instantiation of function template
specialization 'v8::Local<v8::Boolean>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(v8::True(v8::Isolate::GetCurrent())));
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Function *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1514:12: note: in instantiation of function template
specialization 'v8::Local<v8::Function>::Local<v8::Value>' requested here
return NanEscapeScope(NanNew(handle)->Get(kCallbackIndex)
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
In file included from ../src/bufferutil.cc:7:
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:232:5: error: assigning to
'v8::Object *volatile' from incompatible type 'v8::Value *'
TYPE_CHECK(T, S);
^~~~~~~~~~~~~~~~
/Users/cc/.node-gyp/7.9.0/include/node/v8.h:191:37: note: expanded from
macro 'TYPE_CHECK'
*(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
^ ~~~~~~~~~~~~~~~~~~
../node_modules/nan/nan.h:1632:12: note: in instantiation of function template
specialization 'v8::Local<v8::Object>::Local<v8::Value>' requested here
return NanEscapeScope(handle->Get(NanNew(key)).As<v8::Object>());
^
../node_modules/nan/nan.h:398:30: note: expanded from macro 'NanEscapeScope'
# define NanEscapeScope(val) scope.Escape(_NanEnsureLocal(val))
^
12 warnings and 19 errors generated.
make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1
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:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:194:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.5.0
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 /Users/cc/project/node_modules/bufferutil
gyp ERR! node -v v7.9.0
gyp ERR! node-gyp -v v3.5.0
gyp ERR! not ok

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