Error installing node-red-contrib-dahua-device 1.0.3

Hi Guys,

Can anybody possibly help me with this? I get the following error and it fails to install...

2026-05-20T15:33:52.611Z Install : node-red-contrib-dahua-device 1.0.3

2026-05-20T15:33:52.626Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --omit=dev --engine-strict node-red-contrib-dahua-device@1.0.3
2026-05-20T15:34:21.405Z [err] npm warn cleanup Failed to remove some directories [
2026-05-20T15:34:21.405Z [err] npm warn cleanup   [
2026-05-20T15:34:21.405Z [err] npm warn cleanup     '/home/pi/.node-red/node_modules/ref-napi',
2026-05-20T15:34:21.405Z [err] npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/pi/.node-red/node_modules/ref-napi/build/Release'] {
2026-05-20T15:34:21.405Z [err] npm warn cleanup       errno: -39,
2026-05-20T15:34:21.405Z [err] npm warn cleanup       code: 'ENOTEMPTY',
2026-05-20T15:34:21.405Z [err] npm warn cleanup       syscall: 'rmdir',
2026-05-20T15:34:21.405Z [err] npm warn cleanup       path: '/home/pi/.node-red/node_modules/ref-napi/build/Release'
2026-05-20T15:34:21.405Z [err] npm warn cleanup     }
2026-05-20T15:34:21.405Z [err] npm warn cleanup   ],
2026-05-20T15:34:21.405Z [err] npm warn cleanup   [
2026-05-20T15:34:21.405Z [err] npm warn cleanup     '/home/pi/.node-red/node_modules/ref-napi',
2026-05-20T15:34:21.405Z [err] npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/pi/.node-red/node_modules/ref-napi/build/Release'] {
2026-05-20T15:34:21.405Z [err] npm warn cleanup       errno: -39,
2026-05-20T15:34:21.405Z [err] npm warn cleanup       code: 'ENOTEMPTY',
2026-05-20T15:34:21.405Z [err] npm warn cleanup       syscall: 'rmdir',
2026-05-20T15:34:21.405Z [err] npm warn cleanup       path: '/home/pi/.node-red/node_modules/ref-napi/build/Release'
2026-05-20T15:34:21.405Z [err] npm warn cleanup     }
2026-05-20T15:34:21.405Z [err] npm warn cleanup   ]
2026-05-20T15:34:21.405Z [err] npm warn cleanup ]
2026-05-20T15:34:21.435Z [err] npm error code 1
2026-05-20T15:34:21.435Z [err] npm error path /home/pi/.node-red/node_modules/ffi-napi
2026-05-20T15:34:21.435Z [err] npm error command failed
2026-05-20T15:34:21.435Z [err] npm error command sh -c node-gyp-build
2026-05-20T15:34:21.435Z [err] npm error make: Entering directory '/home/pi/.node-red/node_modules/ffi-napi/build'
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/arm/ffi.o
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/ffi/deps/libffi/src/arm/sysv.o
2026-05-20T15:34:21.435Z [err] npm error rm -f Release/obj.target/deps/libffi/libffi.a Release/obj.target/deps/libffi/libffi.a.ar-file-list; mkdir -p `dirname Release/obj.target/deps/libffi/libffi.a`
2026-05-20T15:34:21.435Z [err] npm error ar crs Release/obj.target/deps/libffi/libffi.a @Release/obj.target/deps/libffi/libffi.a.ar-file-list
2026-05-20T15:34:21.435Z [err] npm error   COPY Release/libffi.a
2026-05-20T15:34:21.435Z [err] npm error   CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o
2026-05-20T15:34:21.435Z [err] npm error rm -f Release/obj.target/node_modules/node-addon-api/src/nothing.a Release/obj.target/node_modules/node-addon-api/src/nothing.a.ar-file-list; mkdir -p `dirname Release/obj.target/node_modules/node-addon-api/src/nothing.a`
2026-05-20T15:34:21.435Z [err] npm error ar crs Release/obj.target/node_modules/node-addon-api/src/nothing.a @Release/obj.target/node_modules/node-addon-api/src/nothing.a.ar-file-list
2026-05-20T15:34:21.435Z [err] npm error   COPY Release/nothing.a
2026-05-20T15:34:21.435Z [err] npm error   CXX(target) Release/obj.target/ffi_bindings/src/ffi.o
2026-05-20T15:34:21.435Z [err] npm error make: Leaving directory '/home/pi/.node-red/node_modules/ffi-napi/build'
2026-05-20T15:34:21.435Z [err] npm error gyp info it worked if it ends with ok
2026-05-20T15:34:21.435Z [err] npm error gyp info using node-gyp@11.0.0
2026-05-20T15:34:21.435Z [err] npm error gyp info using node@22.15.0 | linux | arm
2026-05-20T15:34:21.435Z [err] npm error gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn /usr/bin/python3
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args [
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args 'binding.gyp',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-f',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args 'make',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-I',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '/home/pi/.node-red/node_modules/ffi-napi/build/config.gypi',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-I',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '/usr/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-I',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '/home/pi/.cache/node-gyp/22.15.0/include/node/common.gypi',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dlibrary=shared_library',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dvisibility=default',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dnode_root_dir=/home/pi/.cache/node-gyp/22.15.0',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/npm/node_modules/node-gyp',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dnode_lib_file=/home/pi/.cache/node-gyp/22.15.0/<(target_arch)/node.lib',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dmodule_root_dir=/home/pi/.node-red/node_modules/ffi-napi',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Dnode_engine=v8',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '--depth=.',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '--no-parallel',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '--generator-output',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args 'build',
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args '-Goutput_dir=.'
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args ]
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn make
2026-05-20T15:34:21.435Z [err] npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
2026-05-20T15:34:21.435Z [err] npm error ../deps/libffi/src/arm/ffi.c: In function ‘ffi_prep_args’:
2026-05-20T15:34:21.435Z [err] npm error ../deps/libffi/src/arm/ffi.c:72:10: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘short int’ [-Wsign-compare]
2026-05-20T15:34:21.435Z [err] npm error    72 |    && vi < ecif->cif->vfp_nargs && vfp_type_p (*p_arg))
2026-05-20T15:34:21.435Z [err] npm error       |          ^
2026-05-20T15:34:21.435Z [err] npm error ../deps/libffi/src/arm/ffi.c: In function ‘ffi_prep_incoming_args_SYSV’:
2026-05-20T15:34:21.435Z [err] npm error ../deps/libffi/src/arm/ffi.c:335:10: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘short int’ [-Wsign-compare]
2026-05-20T15:34:21.435Z [err] npm error   335 |    && vi < cif->vfp_nargs && vfp_type_p (*p_arg))
2026-05-20T15:34:21.435Z [err] npm error       |          ^
2026-05-20T15:34:21.435Z [err] npm error ../deps/libffi/src/arm/ffi.c: In function ‘layout_vfp_args’:
2026-05-20T15:34:21.435Z [err] npm error ../deps/libffi/src/arm/ffi.c:750:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘unsigned int’ [-Wsign-compare]
2026-05-20T15:34:21.435Z [err] npm error   750 |   for (i = 0; i < cif->nargs; i++)
2026-05-20T15:34:21.435Z [err] npm error       |                 ^
2026-05-20T15:34:21.435Z [err] npm error In file included from ../src/ffi.cc:5:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/get-uv-event-loop-napi-h/include/get-uv-event-loop-napi.h: In function ‘uv_loop_t* get_uv_event_loop(napi_env)’:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/get-uv-event-loop-napi-h/include/get-uv-event-loop-napi.h:26:30: error: invalid conversion from ‘napi_status (*)(node_api_basic_env, uv_loop_s**)’ {aka ‘napi_status (*)(const napi_env__*, uv_loop_s**)’} to ‘get_uv_event_loop_fn’ {aka ‘napi_status (*)(napi_env__*, uv_loop_s**)’} [-fpermissive]
2026-05-20T15:34:21.435Z [err] npm error    26 |   napi_get_uv_event_loop__ = &napi_get_uv_event_loop;
2026-05-20T15:34:21.435Z [err] npm error       |                              ^~~~~~~~~~~~~~~~~~~~~~~
2026-05-20T15:34:21.435Z [err] npm error       |                              |
2026-05-20T15:34:21.435Z [err] npm error       |                              napi_status (*)(node_api_basic_env, uv_loop_s**) {aka napi_status (*)(const napi_env__*, uv_loop_s**)}
2026-05-20T15:34:21.435Z [err] npm error In file included from /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi.h:2171,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.h:2,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.cc:3:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h: In instantiation of ‘napi_status Napi::details::AttachData(napi_env, napi_value, FreeType*, napi_finalize, void*) [with FreeType = Napi::details::CallbackData<Napi::Value (*)(const Napi::CallbackInfo&), Napi::Value>; napi_env = napi_env__*; napi_value = napi_value__*; napi_finalize = void (*)(napi_env__*, void*, void*)]’:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h:1777:39:   required from ‘napi_status Napi::CreateFunction(napi_env, const char*, napi_callback, CbData*, napi_value__**) [with CbData = Napi::details::CallbackData<Napi::Value (*)(const Napi::CallbackInfo&), Napi::Value>; napi_env = napi_env__*; napi_callback = napi_value__* (*)(napi_env__*, napi_callback_info__*); napi_value = napi_value__*; napi_callback_info = napi_callback_info__*]’
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h:1793:38:   required from ‘static Napi::Function Napi::Function::New(napi_env, Callable, const char*, void*) [with Callable = Napi::Value (*)(const Napi::CallbackInfo&); napi_env = napi_env__*]’
2026-05-20T15:34:21.435Z [err] npm error ../src/ffi.cc:58:57:   required from here
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h:65:47: error: invalid conversion from ‘napi_finalize’ {aka ‘void (*)(napi_env__*, void*, void*)’} to ‘node_api_basic_finalize’ {aka ‘void (*)(const napi_env__*, void*, void*)’} [-fpermissive]
2026-05-20T15:34:21.435Z [err] npm error    65 |   status = napi_add_finalizer(env, obj, data, finalizer, hint, nullptr);
2026-05-20T15:34:21.435Z [err] npm error       |                                               ^~~~~~~~~
2026-05-20T15:34:21.435Z [err] npm error       |                                               |
2026-05-20T15:34:21.435Z [err] npm error       |                                               napi_finalize {aka void (*)(napi_env__*, void*, void*)}
2026-05-20T15:34:21.435Z [err] npm error In file included from /home/pi/.cache/node-gyp/22.15.0/include/node/node_api.h:12,
2026-05-20T15:34:21.435Z [err] npm error                  from /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi.h:4,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.h:2,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.cc:3:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.cache/node-gyp/22.15.0/include/node/js_native_api.h:524:44: note:   initializing argument 4 of ‘napi_status napi_add_finalizer(napi_env, napi_value, void*, node_api_basic_finalize, void*, napi_ref__**)’
2026-05-20T15:34:21.435Z [err] npm error   524 |                    node_api_basic_finalize finalize_cb,
2026-05-20T15:34:21.435Z [err] npm error       |                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
2026-05-20T15:34:21.435Z [err] npm error In file included from /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi.h:2171,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.h:2,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.cc:3:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h: In instantiation of ‘napi_status Napi::details::AttachData(napi_env, napi_value, FreeType*, napi_finalize, void*) [with FreeType = Napi::details::CallbackData<void (*)(const Napi::CallbackInfo&), void>; napi_env = napi_env__*; napi_value = napi_value__*; napi_finalize = void (*)(napi_env__*, void*, void*)]’:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h:1777:39:   required from ‘napi_status Napi::CreateFunction(napi_env, const char*, napi_callback, CbData*, napi_value__**) [with CbData = Napi::details::CallbackData<void (*)(const Napi::CallbackInfo&), void>; napi_env = napi_env__*; napi_callback = napi_value__* (*)(napi_env__*, napi_callback_info__*); napi_value = napi_value__*; napi_callback_info = napi_callback_info__*]’
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h:1793:38:   required from ‘static Napi::Function Napi::Function::New(napi_env, Callable, const char*, void*) [with Callable = void (*)(const Napi::CallbackInfo&); napi_env = napi_env__*]’
2026-05-20T15:34:21.435Z [err] npm error ../src/ffi.cc:60:50:   required from here
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi-inl.h:65:47: error: invalid conversion from ‘napi_finalize’ {aka ‘void (*)(napi_env__*, void*, void*)’} to ‘node_api_basic_finalize’ {aka ‘void (*)(const napi_env__*, void*, void*)’} [-fpermissive]
2026-05-20T15:34:21.435Z [err] npm error    65 |   status = napi_add_finalizer(env, obj, data, finalizer, hint, nullptr);
2026-05-20T15:34:21.435Z [err] npm error       |                                               ^~~~~~~~~
2026-05-20T15:34:21.435Z [err] npm error       |                                               |
2026-05-20T15:34:21.435Z [err] npm error       |                                               napi_finalize {aka void (*)(napi_env__*, void*, void*)}
2026-05-20T15:34:21.435Z [err] npm error In file included from /home/pi/.cache/node-gyp/22.15.0/include/node/node_api.h:12,
2026-05-20T15:34:21.435Z [err] npm error                  from /home/pi/.node-red/node_modules/ffi-napi/node_modules/node-addon-api/napi.h:4,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.h:2,
2026-05-20T15:34:21.435Z [err] npm error                  from ../src/ffi.cc:3:
2026-05-20T15:34:21.435Z [err] npm error /home/pi/.cache/node-gyp/22.15.0/include/node/js_native_api.h:524:44: note:   initializing argument 4 of ‘napi_status napi_add_finalizer(napi_env, napi_value, void*, node_api_basic_finalize, void*, napi_ref__**)’
2026-05-20T15:34:21.435Z [err] npm error   524 |                    node_api_basic_finalize finalize_cb,
2026-05-20T15:34:21.435Z [err] npm error       |                    ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
2026-05-20T15:34:21.435Z [err] npm error make: *** [ffi_bindings.target.mk:121: Release/obj.target/ffi_bindings/src/ffi.o] Error 1
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! build error 
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! stack Error: `make` failed with exit code: 2
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:216:23)
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! System Linux 6.1.21-v8+
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! cwd /home/pi/.node-red/node_modules/ffi-napi
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! node -v v22.15.0
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! node-gyp -v v11.0.0
2026-05-20T15:34:21.435Z [err] npm error gyp ERR! not ok
2026-05-20T15:34:21.450Z [err] npm error A complete log of this run can be found in: /home/pi/.npm/_logs/2026-05-20T15_33_53_157Z-debug-0.log
2026-05-20T15:34:21.477Z rc=1

Many TIA's
Ed

Hi Ed,

I do not use node-red-contrib-dahua-device, so not sure I can help. Going through the nodes documentation, I find:

Pre-requirements

Debian based operation systems
sudo apt-get install build-essential git

Did you install these requirements?

Anka

I think that node will not install and is no longer supported, see this issue Node-red 4.0.1 compatibility · Issue #21 · inwaar/node-red-contrib-dahua-device · GitHub

There is a suggestion towards the end of that issue that this may be an alternative GitHub - mgx0/dahua2mqtt · GitHub

Thanks Anka, those requirements were met but checked again... Still no go...
Regds
Ed

Thanks Colin,

Pity.... I'm having problems with Onvif nodes I install on NR.... They work, but cause my little NR server to reboot intermittently... this has been going on for months now... Was hoping to find a workaround to get alarms generated by my ip cameras (about 30-40) direct into Node Red in the easiest method possible...ie a monitoring node of sorts... at this stage I just want to push chosen alarms to a telegram bot, I will sort out the refinements later...

I am hesitant to install a py routine on the little pi... partly because I dont really know what I'm doing and secondly, if I do mess it up I lack the knowledge to recover the situation quickly... A major problem for me as this little pi runs my entire home auto on my premises...

Regds
Ed

That isn't a major problem. What is a problem is that you don't (presumably) have a backup. Make an image backup of the SD card and then if when disaster strikes, as it undoubtedly will as SD cards have a limited life, you will not be in trouble. Also keep copious notes of everything you do and have a separate backup of critical files, such as the .node-red folder, so that you don't need to re-make your image backup too often. I use CloneZilla for the sd card image backup, but there are simpler alternatives.

Which onvif package are you using?
After a reboot, check in /var/log/syslog to find what happened before the reboot. There may well be a solution.

I do have sdcard backup...Done weekly or more often on 2x sd cards...one current and one previous..

Ive tried pretty much all of them, Bart's as well as others, all similar problem in varying degrees...

I have posted a log on the forum a few months back when I first ran into the problem...

Here's from then:

Oct 28 17:00:37 InvPi2 Node-RED[6528]: [red] Uncaught Exception:
Oct 28 17:00:37 InvPi2 Node-RED[6528]: 28 Oct 17:00:37 - [error] TypeError: callback.call is not a function
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at Cam.<anonymous> (/home/pi/.node-red/node_modules/onvif/lib/events.js:309:14)
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at ClientRequest.<anonymous> (/home/pi/.node-red/node_modules/onvif/lib/cam.js:328:4)
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at ClientRequest.emit (node:events:517:28)
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at Socket.socketOnEnd (node:_http_client:525:9)
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at Socket.emit (node:events:529:35)
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at endReadableNT (node:internal/streams/readable:1400:12)
Oct 28 17:00:37 InvPi2 Node-RED[6528]:     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Oct 28 17:00:38 InvPi2 systemd[1]: nodered.service: Main process exited, code=exited, status=1/FAILURE
Oct 28 17:00:38 InvPi2 systemd[1]: nodered.service: Failed with result 'exit-code'.
Oct 28 17:00:38 InvPi2 systemd[1]: nodered.service: Consumed 5h 59min 27.942s CPU time.
Oct 28 17:00:58 InvPi2 systemd[1]: nodered.service: Scheduled restart job, restart counter is at 7.
Oct 28 17:00:58 InvPi2 systemd[1]: Stopped Node-RED graphical event wiring tool.
Oct 28 17:00:58 InvPi2 systemd[1]: nodered.service: Consumed 5h 59min 27.942s CPU time.
Oct 28 17:00:58 InvPi2 systemd[1]: Started Node-RED graphical event wiring tool.

Cheers
Ed

What do you see if you go into your .node-red folder (or wherever the flows file is located) and run
npm list onvif