henry-spanka / node-red-contrib-hikvision

Hikvision API for Node Red
MIT License
10 stars 1 forks source link

Unable to get this to install, have tried updating package.json as suggested in closed threads... #4

Closed peteshoard closed 4 years ago

peteshoard commented 4 years ago

Likely to be something to do with an unassigned variable?

2019-10-20T15:58:19.896Z [err] In file included from ../../nan/nan.h:190, 2019-10-20T15:58:19.896Z [err] from ../src/binding.cc:7: 2019-10-20T15:58:19.896Z [err] ../../nan/nan_maybe_43_inl.h: In function ‘Nan::Maybe Nan::ForceSet(v8::Local, v8::Local, v8::Local, v8::PropertyAttribute)’: 2019-10-20T15:58:19.896Z [err] ../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’ 2019-10-20T15:58:19.896Z [err] return obj->ForceSet(GetCurrentContext(), key, value, attribs); 2019-10-20T15:58:19.896Z [err] ^~~~ 2019-10-20T15:58:20.022Z [err] In file included from ../src/binding.cc:7: 2019-10-20T15:58:20.022Z [err] ../../nan/nan.h: In function ‘v8::Local Nan::MakeCallback(v8::Local, v8::Local, int, v8::Local)’: 2019-10-20T15:58:20.022Z [err] ../../nan/nan.h:817:60: warning: ‘v8::Local node::MakeCallback(v8::Isolate, v8::Local, v8::Local, int, v8::Local*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations] 2019-10-20T15:58:20.022Z [err] v8::Isolate::GetCurrent(), target, func, argc, argv);

henry-spanka commented 4 years ago

Hello, can you please try to install the plugin manually with: npm install henry-spanka/node-red-contrib-hikvision#master from within the nodeRED directory. The NPM version is outdated and does not work with newer node versions. I may release an updated version in the future.

ghost commented 4 years ago

I may release an updated version in the future.

Please! This is a very necessary plugin!

ghost commented 4 years ago

npm install henry-spanka/node-red-contrib-hikvision#master it didn't help me

henry-spanka commented 4 years ago

Hi, which node version do you use? Check with node --version.

arozhankov commented 4 years ago

Hi which node version do you use? Check with node --version.

8.16.0

peteshoard commented 4 years ago

I have tried these also, not having any success. my Node version is 10.16.3

I have some workarounds for specific functions here such as Moving PTZ to a preset and taking a snapshot from a camera. If anyone needs help with these, please let me know.

What I would really like to be able to do is read the doorbell push from my DS-KB6003WIP hikvision doorbell - but I can't seem to be able to do that, no matter what I try (if anyone has any suggestions, im all ears)

ozett commented 4 years ago

any suggestion to install master with cli ? had no succes on first try:

image

henry-spanka commented 4 years ago

Hi, you can not install it as root. Try to run the command with the node red user.

ozett commented 4 years ago

i had the same install issue with node-red-contrib-hikcamera solved that this way: ( found this on google -> https://github.com/npm/npm/issues/18038 )

logged in as normal user, than on the command line i did a: sudo su - than changed to my node-red dir (/home/.node-red) and did npm install node-red-contrib-hikcamera

looks like it helped image

ozett commented 4 years ago

Hi, you can not install it as root. Try to run the command with the node red user.

years ago i did not use a node-red user, i installed all as root on my local systems... working so far...

but i will try your suggestion... thx for quick reply 👍

ozett commented 4 years ago

i re-used my before mentioned sudo su - session for npm install henry-spanka/node-red-contrib-hikvision#master

looked promising..: image

henry-spanka commented 4 years ago

👍

@arozhankov 8.X is not supported. Please use at least 10.X.

@peteshoard What error did you get when installing the plugin? I'm not sure if Hikvision doorbells are supported. I haven't tested it and this plugin only implements basic support for motion events.

peteshoard commented 4 years ago

Output from running: npm install henry-spanka/node-red-contrib-hikvision#master

npm WARN saveError ENOENT: no such file or directory, open '/home/peter/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/peter/package.json'
npm WARN peter No description
npm WARN peter No repository field.
npm WARN peter No README data
npm WARN peter No license field.

+ node-red-contrib-hikvision@1.1.0
updated 1 package and audited 13093 packages in 25.047s
found 85 vulnerabilities (7 low, 30 moderate, 48 high)
  run `npm audit fix` to fix them, or `npm audit` for details

This is the stack from node-red (sorry its massive)

-----------------------------------------------------------
2019-10-28T17:00:50.797Z Install : node-red-contrib-hikvision 1.0.0

2019-10-28T17:00:50.867Z npm install --no-audit --no-update-notifier --save --save-prefix="~" --production node-red-contrib-hikvision@1.0.0
2019-10-28T17:01:32.437Z [out] 
2019-10-28T17:01:32.437Z [out] > ref@1.3.3 install /home/peter/.node-red/node_modules/net-keepalive/node_modules/ref
2019-10-28T17:01:32.437Z [out] > node-gyp rebuild
2019-10-28T17:01:32.437Z [out] 
2019-10-28T17:01:34.830Z [out] make: Entering directory '/home/peter/.node-red/node_modules/net-keepalive/node_modules/ref/build'
2019-10-28T17:01:34.832Z [out]   CXX(target) Release/obj.target/binding/src/binding.o
2019-10-28T17:01:36.964Z [err] In file included from ../../nan/nan.h:190,
2019-10-28T17:01:36.964Z [err]                  from ../src/binding.cc:7:
2019-10-28T17:01:36.964Z [err] ../../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)’:
2019-10-28T17:01:36.964Z [err] ../../nan/nan_maybe_43_inl.h:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
2019-10-28T17:01:36.964Z [err]    return obj->ForceSet(GetCurrentContext(), key, value, attribs);
2019-10-28T17:01:36.964Z [err]                ^~~~~~~~
2019-10-28T17:01:37.086Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.086Z [err] ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
2019-10-28T17:01:37.086Z [err] ../../nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.086Z [err]          v8::Isolate::GetCurrent(), target, func, argc, argv);
2019-10-28T17:01:37.086Z [err]                                                             ^
2019-10-28T17:01:37.087Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.087Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:177:50: note: declared here
2019-10-28T17:01:37.087Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.087Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.087Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.087Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.087Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.087Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.087Z [err] ../../nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.087Z [err]          v8::Isolate::GetCurrent(), target, func, argc, argv);
2019-10-28T17:01:37.087Z [err]                                                             ^
2019-10-28T17:01:37.087Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.087Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:177:50: note: declared here
2019-10-28T17:01:37.087Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.087Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.087Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.087Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.087Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.088Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.088Z [err] ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
2019-10-28T17:01:37.088Z [err] ../../nan/nan.h:831:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.088Z [err]          v8::Isolate::GetCurrent(), target, symbol, argc, argv);
2019-10-28T17:01:37.088Z [err]                                                               ^
2019-10-28T17:01:37.088Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.088Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:170:50: note: declared here
2019-10-28T17:01:37.088Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.088Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.088Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.088Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.088Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.088Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.088Z [err] ../../nan/nan.h:831:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.088Z [err]          v8::Isolate::GetCurrent(), target, symbol, argc, argv);
2019-10-28T17:01:37.088Z [err]                                                               ^
2019-10-28T17:01:37.088Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.088Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:170:50: note: declared here
2019-10-28T17:01:37.088Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.088Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.088Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.088Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.088Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.089Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.089Z [err] ../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
2019-10-28T17:01:37.089Z [err] ../../nan/nan.h:845:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.089Z [err]          v8::Isolate::GetCurrent(), target, method, argc, argv);
2019-10-28T17:01:37.089Z [err]                                                               ^
2019-10-28T17:01:37.090Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.090Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:163:50: note: declared here
2019-10-28T17:01:37.090Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.090Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.090Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.090Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.090Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.090Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.090Z [err] ../../nan/nan.h:845:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.090Z [err]          v8::Isolate::GetCurrent(), target, method, argc, argv);
2019-10-28T17:01:37.090Z [err]                                                               ^
2019-10-28T17:01:37.090Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.090Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:163:50: note: declared here
2019-10-28T17:01:37.090Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.090Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.090Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.090Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.090Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.107Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.107Z [err] ../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
2019-10-28T17:01:37.107Z [err] ../../nan/nan.h:1453:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.107Z [err]      ));
2019-10-28T17:01:37.107Z [err]      ^
2019-10-28T17:01:37.107Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.107Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:177:50: note: declared here
2019-10-28T17:01:37.107Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.107Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.107Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.107Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.107Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.107Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.107Z [err] ../../nan/nan.h:1453:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
2019-10-28T17:01:37.107Z [err]      ));
2019-10-28T17:01:37.107Z [err]      ^
2019-10-28T17:01:37.107Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.107Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:177:50: note: declared here
2019-10-28T17:01:37.107Z [err]                  NODE_EXTERN v8::Local<v8::Value> MakeCallback(
2019-10-28T17:01:37.107Z [err]                                                   ^~~~~~~~~~~~
2019-10-28T17:01:37.107Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:91:42: note: in definition of macro ‘NODE_DEPRECATED’
2019-10-28T17:01:37.107Z [err]      __attribute__((deprecated(message))) declarator
2019-10-28T17:01:37.107Z [err]                                           ^~~~~~~~~~
2019-10-28T17:01:37.129Z [err] In file included from ../src/binding.cc:7:
2019-10-28T17:01:37.129Z [err] ../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
2019-10-28T17:01:37.129Z [err] ../../nan/nan.h:1704: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]
2019-10-28T17:01:37.129Z [err]      , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
2019-10-28T17:01:37.129Z [err]                                                               ^
2019-10-28T17:01:37.222Z [err] ../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteObject(Nan::NAN_METHOD_ARGS_TYPE)’:
2019-10-28T17:01:37.222Z [err] ../src/binding.cc:229:54: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class Nan::Persistent<v8::Object>’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
2019-10-28T17:01:37.222Z [err]      memcpy(pptr, &p2, sizeof(Nan::Persistent<Object>));
2019-10-28T17:01:37.222Z [err]                                                       ^
2019-10-28T17:01:37.223Z [err] In file included from ../../nan/nan.h:311,
2019-10-28T17:01:37.223Z [err]                  from ../src/binding.cc:7:
2019-10-28T17:01:37.223Z [err] ../../nan/nan_persistent_12_inl.h:12:40: note: ‘class Nan::Persistent<v8::Object>’ declared here
2019-10-28T17:01:37.223Z [err]  template<typename T, typename M> class Persistent :
2019-10-28T17:01:37.223Z [err]                                         ^~~~~~~~~~
2019-10-28T17:01:37.224Z [err] ../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::ReadPointer(Nan::NAN_METHOD_ARGS_TYPE)’:
2019-10-28T17:01:37.224Z [err] ../src/binding.cc:253:38: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
2019-10-28T17:01:37.224Z [err]    size_t size = info[2]->Uint32Value();
2019-10-28T17:01:37.224Z [err]                                       ^
2019-10-28T17:01:37.224Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:26,
2019-10-28T17:01:37.224Z [err]                  from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.224Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.224Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:2477:47: note: declared here
2019-10-28T17:01:37.224Z [err]    V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
2019-10-28T17:01:37.224Z [err]                                                ^~~~~~~~~~~
2019-10-28T17:01:37.224Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
2019-10-28T17:01:37.224Z [err]    declarator __attribute__((deprecated(message)))
2019-10-28T17:01:37.224Z [err]    ^~~~~~~~~~
2019-10-28T17:01:37.236Z [err] ../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteInt64(Nan::NAN_METHOD_ARGS_TYPE)’:
2019-10-28T17:01:37.236Z [err] ../src/binding.cc:360:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
2019-10-28T17:01:37.236Z [err]      String::Utf8Value _str(in);
2019-10-28T17:01:37.236Z [err]                               ^
2019-10-28T17:01:37.236Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:26,
2019-10-28T17:01:37.236Z [err]                  from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.236Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.236Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:2892:28: note: declared here
2019-10-28T17:01:37.236Z [err]                    explicit Utf8Value(Local<v8::Value> obj));
2019-10-28T17:01:37.236Z [err]                             ^~~~~~~~~
2019-10-28T17:01:37.236Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
2019-10-28T17:01:37.236Z [err]    declarator __attribute__((deprecated(message)))
2019-10-28T17:01:37.236Z [err]    ^~~~~~~~~~
2019-10-28T17:01:37.243Z [err] ../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteUInt64(Nan::NAN_METHOD_ARGS_TYPE)’:
2019-10-28T17:01:37.243Z [err] ../src/binding.cc:447:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated: Use Isolate version [-Wdeprecated-declarations]
2019-10-28T17:01:37.243Z [err]      String::Utf8Value _str(in);
2019-10-28T17:01:37.243Z [err]                               ^
2019-10-28T17:01:37.243Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:26,
2019-10-28T17:01:37.243Z [err]                  from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.243Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.243Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:2892:28: note: declared here
2019-10-28T17:01:37.243Z [err]                    explicit Utf8Value(Local<v8::Value> obj));
2019-10-28T17:01:37.243Z [err]                             ^~~~~~~~~
2019-10-28T17:01:37.243Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
2019-10-28T17:01:37.243Z [err]    declarator __attribute__((deprecated(message)))
2019-10-28T17:01:37.243Z [err]    ^~~~~~~~~~
2019-10-28T17:01:37.249Z [err] ../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::ReinterpretBuffer(Nan::NAN_METHOD_ARGS_TYPE)’:
2019-10-28T17:01:37.249Z [err] ../src/binding.cc:521:38: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
2019-10-28T17:01:37.249Z [err]    size_t size = info[1]->Uint32Value();
2019-10-28T17:01:37.249Z [err]                                       ^
2019-10-28T17:01:37.249Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:26,
2019-10-28T17:01:37.249Z [err]                  from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.249Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.249Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:2477:47: note: declared here
2019-10-28T17:01:37.249Z [err]    V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
2019-10-28T17:01:37.249Z [err]                                                ^~~~~~~~~~~
2019-10-28T17:01:37.249Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
2019-10-28T17:01:37.249Z [err]    declarator __attribute__((deprecated(message)))
2019-10-28T17:01:37.249Z [err]    ^~~~~~~~~~
2019-10-28T17:01:37.251Z [err] ../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::ReinterpretBufferUntilZeros(Nan::NAN_METHOD_ARGS_TYPE)’:
2019-10-28T17:01:37.251Z [err] ../src/binding.cc:550:44: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
2019-10-28T17:01:37.251Z [err]    uint32_t numZeros = info[1]->Uint32Value();
2019-10-28T17:01:37.251Z [err]                                             ^
2019-10-28T17:01:37.252Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:26,
2019-10-28T17:01:37.252Z [err]                  from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.252Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.252Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:2477:47: note: declared here
2019-10-28T17:01:37.252Z [err]    V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
2019-10-28T17:01:37.252Z [err]                                                ^~~~~~~~~~~
2019-10-28T17:01:37.252Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8config.h:324:3: note: in definition of macro ‘V8_DEPRECATED’
2019-10-28T17:01:37.252Z [err]    declarator __attribute__((deprecated(message)))
2019-10-28T17:01:37.252Z [err]    ^~~~~~~~~~
2019-10-28T17:01:37.316Z [err] In file included from ../src/binding.cc:5:
2019-10-28T17:01:37.316Z [err] ../src/binding.cc: At global scope:
2019-10-28T17:01:37.316Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:573: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]
2019-10-28T17:01:37.316Z [err]        (node::addon_register_func) (regfunc),                          \
2019-10-28T17:01:37.316Z [err]                                            ^
2019-10-28T17:01:37.316Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:607:3: note: in expansion of macro ‘NODE_MODULE_X’
2019-10-28T17:01:37.316Z [err]    NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
2019-10-28T17:01:37.316Z [err]    ^~~~~~~~~~~~~
2019-10-28T17:01:37.316Z [err] ../src/binding.cc:660:1: note: in expansion of macro ‘NODE_MODULE’
2019-10-28T17:01:37.316Z [err]  NODE_MODULE(binding, init);
2019-10-28T17:01:37.316Z [err]  ^~~~~~~~~~~
2019-10-28T17:01:37.432Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.432Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.432Z [err] /home/peter/.cache/node-gyp/10.16.3/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>&)]’:
2019-10-28T17:01:37.432Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/node_object_wrap.h:84:78:   required from here
2019-10-28T17:01:37.432Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:9502: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]
2019-10-28T17:01:37.432Z [err]                 reinterpret_cast<Callback>(callback), type);
2019-10-28T17:01:37.432Z [err]                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-10-28T17:01:37.458Z [err] /home/peter/.cache/node-gyp/10.16.3/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>&)]’:
2019-10-28T17:01:37.458Z [err] ../../nan/nan_object_wrap.h:66:61:   required from here
2019-10-28T17:01:37.458Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:9502: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]
2019-10-28T17:01:37.519Z [err] In file included from ../../nan/nan.h:2186,
2019-10-28T17:01:37.519Z [err]                  from ../src/binding.cc:7:
2019-10-28T17:01:37.519Z [err] ../../nan/nan_weak.h: In instantiation of ‘Nan::WeakCallbackInfo<P>::WeakCallbackInfo(Nan::Persistent<v8::Value>*, Nan::WeakCallbackInfo<P>::Callback, void*, void*, void*) [with T = void; Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<void>&)]’:
2019-10-28T17:01:37.519Z [err] ../../nan/nan_weak.h:264:12:   required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = void; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<void>&); Nan::WeakCallbackType = v8::WeakCallbackType]’
2019-10-28T17:01:37.519Z [err] ../src/binding.cc:228:77:   required from here
2019-10-28T17:01:37.519Z [err] ../../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]
2019-10-28T17:01:37.519Z [err]      std::memcpy(&persistent_, persistent, sizeof (v8::Persistent<v8::Value>));
2019-10-28T17:01:37.519Z [err]      ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-10-28T17:01:37.520Z [err] In file included from /home/peter/.cache/node-gyp/10.16.3/include/node/node.h:63,
2019-10-28T17:01:37.520Z [err]                  from ../src/binding.cc:5:
2019-10-28T17:01:37.520Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:685:35: note: ‘class v8::Persistent<v8::Value>’ declared here
2019-10-28T17:01:37.520Z [err]  template <class T, class M> class Persistent : public PersistentBase<T> {
2019-10-28T17:01:37.520Z [err]                                    ^~~~~~~~~~
2019-10-28T17:01:37.523Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::WeakCallbackInfo<void>; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::WeakCallbackInfo<void> >&)]’:
2019-10-28T17:01:37.523Z [err] ../../nan/nan_weak.h:268:35:   required from ‘void Nan::Persistent<T, M>::SetWeak(P*, typename Nan::WeakCallbackInfo<P>::Callback, Nan::WeakCallbackType) [with P = void; T = v8::Object; M = v8::NonCopyablePersistentTraits<v8::Object>; typename Nan::WeakCallbackInfo<P>::Callback = void (*)(const Nan::WeakCallbackInfo<void>&); Nan::WeakCallbackType = v8::WeakCallbackType]’
2019-10-28T17:01:37.523Z [err] ../src/binding.cc:228:77:   required from here
2019-10-28T17:01:37.523Z [err] /home/peter/.cache/node-gyp/10.16.3/include/node/v8.h:9502:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::WeakCallbackInfo<void> >::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::WeakCallbackInfo<void> >&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type]
2019-10-28T17:01:37.523Z [err]                 reinterpret_cast<Callback>(callback), type);
2019-10-28T17:01:37.523Z [err]                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-10-28T17:01:37.721Z [err] make: *** [binding.target.mk:99: Release/obj.target/binding/src/binding.o] Error 1
2019-10-28T17:01:37.721Z [out] make: Leaving directory '/home/peter/.node-red/node_modules/net-keepalive/node_modules/ref/build'
2019-10-28T17:01:37.726Z [err] gyp
2019-10-28T17:01:37.727Z [err]  
2019-10-28T17:01:37.727Z [err] ERR! 
2019-10-28T17:01:37.727Z [err] build error
2019-10-28T17:01:37.727Z [err]  
2019-10-28T17:01:37.729Z [err] gyp
2019-10-28T17:01:37.729Z [err]  ERR! 
2019-10-28T17:01:37.729Z [err] stack Error: `make` failed with exit code: 2
2019-10-28T17:01:37.729Z [err] gyp
2019-10-28T17:01:37.730Z [err]  
2019-10-28T17:01:37.730Z [err] ERR! 
2019-10-28T17:01:37.730Z [err] stack
2019-10-28T17:01:37.730Z [err]      at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:196:23)
2019-10-28T17:01:37.730Z [err] gyp
2019-10-28T17:01:37.730Z [err]  ERR!
2019-10-28T17:01:37.730Z [err]  
2019-10-28T17:01:37.730Z [err] stack
2019-10-28T17:01:37.730Z [err]      at ChildProcess.emit (events.js:198:13)
2019-10-28T17:01:37.730Z [err] gyp
2019-10-28T17:01:37.730Z [err]  
2019-10-28T17:01:37.730Z [err] ERR! 
2019-10-28T17:01:37.730Z [err] stack
2019-10-28T17:01:37.731Z [err]      at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
2019-10-28T17:01:37.731Z [err] gyp
2019-10-28T17:01:37.732Z [err]  ERR! System
2019-10-28T17:01:37.732Z [err]  Linux 4.19.75-v7+
2019-10-28T17:01:37.732Z [err] gyp
2019-10-28T17:01:37.732Z [err]  
2019-10-28T17:01:37.733Z [err] ERR! 
2019-10-28T17:01:37.733Z [err] command
2019-10-28T17:01:37.733Z [err]  "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2019-10-28T17:01:37.733Z [err] gyp
2019-10-28T17:01:37.733Z [err]  
2019-10-28T17:01:37.733Z [err] ERR! 
2019-10-28T17:01:37.733Z [err] cwd
2019-10-28T17:01:37.733Z [err]  /home/peter/.node-red/node_modules/net-keepalive/node_modules/ref
2019-10-28T17:01:37.733Z [err] gyp
2019-10-28T17:01:37.734Z [err]  
2019-10-28T17:01:37.734Z [err] ERR! 
2019-10-28T17:01:37.734Z [err] node -v
2019-10-28T17:01:37.734Z [err]  v10.16.3
2019-10-28T17:01:37.734Z [err] gyp
2019-10-28T17:01:37.734Z [err]  
2019-10-28T17:01:37.734Z [err] ERR! 
2019-10-28T17:01:37.734Z [err] node-gyp -v
2019-10-28T17:01:37.734Z [err]  v5.0.3
2019-10-28T17:01:37.734Z [err] gyp
2019-10-28T17:01:37.735Z [err]  ERR!
2019-10-28T17:01:37.735Z [err]  
2019-10-28T17:01:37.735Z [err] not ok
2019-10-28T17:01:37.735Z [err]  
2019-10-28T17:01:40.085Z [err] npm WARN node-red-project@0.0.1 No repository field.
2019-10-28T17:01:40.085Z [err] npm WARN node-red-project@0.0.1 No license field.
2019-10-28T17:01:40.086Z [err] 
2019-10-28T17:01:40.108Z [err] npm
2019-10-28T17:01:40.108Z [err]  ERR! code
2019-10-28T17:01:40.108Z [err]  ELIFECYCLE
2019-10-28T17:01:40.109Z [err] npm
2019-10-28T17:01:40.109Z [err]  ERR! 
2019-10-28T17:01:40.109Z [err] errno 1
2019-10-28T17:01:40.110Z [err] npm
2019-10-28T17:01:40.110Z [err]  ERR! ref@1.3.3 install: `node-gyp rebuild`
2019-10-28T17:01:40.111Z [err] npm 
2019-10-28T17:01:40.111Z [err] ERR!
2019-10-28T17:01:40.111Z [err]  Exit status 1
2019-10-28T17:01:40.111Z [err] npm
2019-10-28T17:01:40.112Z [err]  ERR!
2019-10-28T17:01:40.112Z [err]  
2019-10-28T17:01:40.112Z [err] npm
2019-10-28T17:01:40.112Z [err]  ERR!
2019-10-28T17:01:40.112Z [err]  Failed at the ref@1.3.3 install script.
2019-10-28T17:01:40.112Z [err] npm 
2019-10-28T17:01:40.112Z [err] ERR!
2019-10-28T17:01:40.112Z [err]  This is probably not a problem with npm. There is likely additional logging output above.
2019-10-28T17:01:40.164Z [err] 
2019-10-28T17:01:40.164Z [err] npm ERR!
2019-10-28T17:01:40.164Z [err]  A complete log of this run can be found in:
2019-10-28T17:01:40.164Z [err] npm 
2019-10-28T17:01:40.164Z [err] ERR!
2019-10-28T17:01:40.164Z [err]      /home/peter/.npm/_logs/2019-10-28T17_01_40_133Z-debug.log
2019-10-28T17:01:40.196Z rc=1
henry-spanka commented 4 years ago

@peteshoard you cannot install the module via the GUI currently as I haven't released a new version yet which contains fixes for node 10.X and drops support for <= 8.X. once @ozett confirms that the fixes work I will release a new version.

Your first approach was right but you are in the wrong directory. Try this:

  1. cd /home/peter/.node-red
  2. npm install henry-spanka/node-red-contrib-hikvision#master --save
  3. Restart nodered and check if the plugin is listed as installed in the palette manager.
ozett commented 4 years ago

i dont know if i should have tried something else to get the latest version, but i tried the cli-install from the above posting an got also a massive error-log. this is not the fix-version, right?

root@deb8mpd-virt:~/.node-red# npm remove node-red-contrib-hikcamera
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

removed 1 package and audited 9771 packages in 11.129s
found 59 vulnerabilities (2 low, 13 moderate, 44 high)
  run `npm audit fix` to fix them, or `npm audit` for details
root@deb8mpd-virt:~/.node-red# screen -r
[detached from 1870.pts-0.deb8mpd-virt]
root@deb8mpd-virt:~/.node-red# screen -r
[detached from 1870.pts-0.deb8mpd-virt]
root@deb8mpd-virt:~/.node-red# screen -r
[detached from 1870.pts-0.deb8mpd-virt]
root@deb8mpd-virt:~/.node-red# screen -r
[detached from 1870.pts-0.deb8mpd-virt]
root@deb8mpd-virt:~/.node-red# npm install henry-spanka/node-red-contrib-hikvision#master --save

> ref@1.3.3 install /root/.node-red/node_modules/net-keepalive/node_modules/ref
> node-gyp rebuild

make: Entering directory '/root/.node-red/node_modules/net-keepalive/node_modules/ref/build'
  CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../../nan/nan.h:190:0,
                 from ../src/binding.cc:7:
../../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:88:15: error: ‘class v8::Object’ has no member named ‘ForceSet’
   return obj->ForceSet(GetCurrentContext(), key, value, attribs);
               ^
In file included from ../../nan/nan_new.h:189:0,
                 from ../../nan/nan.h:196,
                 from ../src/binding.cc:7:
../../nan/nan_implementation_12_inl.h: In static member function ‘static Nan::imp::FactoryBase<v8::StringObject>::return_t Nan::imp::Factory<v8::StringObject>::New(v8::Local<v8::String>)’:
../../nan/nan_implementation_12_inl.h:345:37: warning: ‘static v8::Local<v8::Value> v8::StringObject::New(v8::Local<v8::String>)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:5241): Use Isolate* version [-Wdeprecated-declarations]
   return v8::StringObject::New(value).As<v8::StringObject>();
                                     ^
In file included from ../src/binding.cc:7:0:
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:817:60: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/node.h:171): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, func, argc, argv);
                                                            ^
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:831:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/node.h:164): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, symbol, argc, argv);
                                                              ^
../../nan/nan.h: In function ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’:
../../nan/nan.h:845:62: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/node.h:157): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
         v8::Isolate::GetCurrent(), target, method, argc, argv);
                                                              ^
../../nan/nan.h: In constructor ‘Nan::Utf8String::Utf8String(v8::Local<v8::Value>)’:
../../nan/nan.h:890:53: warning: ‘v8::Local<v8::String> v8::Value::ToString() const’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:10248): Use maybe version [-Wdeprecated-declarations]
       v8::Local<v8::String> string = from->ToString();
                                                     ^
../../nan/nan.h:900:74: warning: ‘int v8::String::WriteUtf8(char*, int, int*, int) const’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2753): Use Isolate* version [-Wdeprecated-declarations]
         length_ = string->WriteUtf8(str_, static_cast<int>(len), 0, flags);
                                                                          ^
../../nan/nan.h: In member function ‘v8::Local<v8::Value> Nan::Callback::Call_(v8::Isolate*, v8::Local<v8::Object>, int, v8::Local<v8::Value>*) const’:
../../nan/nan.h:1453:5: warning: ‘v8::Local<v8::Value> node::MakeCallback(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/node.h:171): Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
     ));
     ^
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteObject(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:222:43: warning: ‘bool v8::Value::BooleanValue() const’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2568): Use maybe version [-Wdeprecated-declarations]
   bool persistent = info[3]->BooleanValue();
                                           ^
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::ReadPointer(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:253:38: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2571): Use maybe version [-Wdeprecated-declarations]
   size_t size = info[2]->Uint32Value();
                                      ^
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteInt64(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:360:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2991): Use Isolate version [-Wdeprecated-declarations]
     String::Utf8Value _str(in);
                              ^
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::WriteUInt64(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:447:30: warning: ‘v8::String::Utf8Value::Utf8Value(v8::Local<v8::Value>)’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2991): Use Isolate version [-Wdeprecated-declarations]
     String::Utf8Value _str(in);
                              ^
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::ReinterpretBuffer(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:521:38: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2571): Use maybe version [-Wdeprecated-declarations]
   size_t size = info[1]->Uint32Value();
                                      ^
../src/binding.cc: In function ‘Nan::NAN_METHOD_RETURN_TYPE {anonymous}::ReinterpretBufferUntilZeros(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/binding.cc:550:44: warning: ‘uint32_t v8::Value::Uint32Value() const’ is deprecated (declared at /root/.cache/node-gyp/11.5.0/include/node/v8.h:2571): Use maybe version [-Wdeprecated-declarations]
   uint32_t numZeros = info[1]->Uint32Value();
                                            ^
In file included from ../../nan/nan.h:190:0,
                 from ../src/binding.cc:7:
../../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:89:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
binding.target.mk:101: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/root/.node-red/node_modules/net-keepalive/node_modules/ref/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 3.14-1-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.node-red/node_modules/net-keepalive/node_modules/ref
gyp ERR! node -v v11.5.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for net-keepalive@0.3.8: wanted: {"node":">=0.10 <=0.12||>=4 <=7"} (current: {"node":"11.5.0","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: net-keepalive@0.3.8
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ref@1.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref@1.3.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-10-28T19_32_23_834Z-debug.log
root@deb8mpd-virt:~/.node-red#
peteshoard commented 4 years ago

Thanks Henry, but still no luck (more output on the command line now though) , think I'm now getting the same stack as I do via the GUI

gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp /lib/build.js:196:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:1 2) gyp ERR! System Linux 4.19.75-v7+ gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node -gyp.js" "rebuild" gyp ERR! cwd /home/peter/.node-red/node_modules/net-keepalive/node_modules/ref gyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v5.0.3 gyp ERR! not ok npm WARN node-red-project@0.0.1 No repository field. npm WARN node-red-project@0.0.1 No license field.

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! ref@1.3.3 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the ref@1.3.3 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging outpu t above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/peter/.npm/_logs/2019-10-28T19_42_17_599Z-debug.log

ozett commented 4 years ago

i try in the dark....

npm install net-keepalive

image

run without issues, but still an error with

npm install henry-spanka/node-red-contrib-hikvision#master

like this

gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:189:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)
gyp ERR! System Linux 3.14-1-amd64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.node-red/node_modules/node-hikvision-api/node_modules/net-keepalive/node_modules/ref
gyp ERR! node -v v11.5.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN notsup Unsupported engine for net-keepalive@0.3.8: wanted: {"node":">=0.10 <=0.12||>=4 <=7"} (current: {"node":"11.5.0","npm":"6.12.0"})
npm WARN notsup Not compatible with your version of node/npm: net-keepalive@0.3.8
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

maybe low-version 0.38 hardcoded leads to this error? i am only guessing...

henry-spanka commented 4 years ago

@peteshoard I screwed up. I have already fixed this. Please to run it again!

ozett commented 4 years ago

looks better..

image

peteshoard commented 4 years ago

BINGO!

henry-spanka commented 4 years ago

Great! 👍

peteshoard commented 4 years ago

Sadly, the saga continues :)

Having the Alarm-In Node running, connecting to a camera or a DVR crashes node-red as soon as it gets a notification, it also seems to mess with some of the other nodes (Alexa ones especially)

Is there any write-up on what the input/output of the nodes should be for these functions?

Thanks for all your help thus far

Pete

arozhankov commented 4 years ago

Sadly, the saga continues :)

Having the Alarm-In Node running, connecting to a camera or a DVR crashes node-red as soon as it gets a notification, it also seems to mess with some of the other nodes (Alexa ones especially)

Is there any write-up on what the input/output of the nodes should be for these functions?

Thanks for all your help thus far

Pete

Oh! The same story! But I had a node-red reboot when opening flow, where there were alarm-in nodes.

henry-spanka commented 4 years ago

😭Do you get any error message? Please check the node-red log.

ozett commented 4 years ago

after one day running fine, my cams are disconnected... how do i get more verbose logging?

image

only "error" is a bit short for debugging this issue... a restart of the whole node-red helped, but i dont want to do these more often... 😸

henry-spanka commented 4 years ago

I added some logging. Unfortunately you need to reinstall the plugin (update) and restart node-red :(

My last restart was 2 weeks ago and I didn't have a single error yet. Do you use a wired cam or via WiFi?

ozett commented 4 years ago

all cams are wired, latest firmware (today)... i will give the new version a try and report here..

thx!

--->added: i am now on: node-red-contrib-hikvision@1.1.0 --->added: as i now see the need for logging to nail some time-outs down (maybe hikvision or not) i found the logging option for node-red and set it to verbose. ...i will report..

https://nodered.org/docs/user-guide/runtime/logging --->added: by the way: do you know how to get the node, which is causing my timeout-warnings in the log - short like this?

0 Oct 07:17:31 - [info] [debug:c1e7a999.370bc8]
[warn] 2019-10-30 06:17:34.373 connection timed out, retrying...
3
ozett commented 4 years ago

i see now a brief connection closed in the debug-node... what does it mean? is this something new from the logging improvement? could this be a little more verbose?

image

ozett commented 4 years ago

my debugging lead to verbose-logging. I start another thread from here with this interested https://github.com/henry-spanka/node-red-contrib-hikvision/issues/8#issue-514488580

henry-spanka commented 4 years ago

Closing this as it gets off topic.