Error while Installing NPM node-red-contrib-onvif-nodes


I am trying to install the node-red-contrib-onvif-nodes on my RaspberryMatic. Unfortunately I always get the following error:

root@homematic-raspi:/usr/local/addons/redmatic# npm install node-red-contrib-on
npm WARN deprecated request@2.88.2: request has been deprecated, see
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npm-cache/_logs/2020-12-19T20_00_56_621Z-debug.log

The log then contains the following:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/bin/node',
1 verbose cli '/usr/bin/npm',
1 verbose cli 'install',
1 verbose cli 'node-red-contrib-onvif-nodes'
1 verbose cli ]
2 info using npm@6.14.6
3 info using node@v12.18.4
4 verbose npm-session add19c412ac11246
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 200 280ms
8 http fetch GET 200 780ms
9 silly pacote tag manifest for node-red-contrib-onvif-nodes@latest fetched in 1076ms
10 timing stage:loadCurrentTree Completed in 1125ms
11 silly install loadIdealTree
12 silly install cloneCurrentTreeToIdealTree
13 timing stage:loadIdealTree:cloneCurrentTree Completed in 0ms
14 silly install loadShrinkwrap
15 timing stage:loadIdealTree:loadShrinkwrap Completed in 6ms
16 silly install loadAllDepsIntoIdealTree
17 silly resolveWithNewModule node-red-contrib-onvif-nodes@0.0.1-beta.12 checking installable status
18 silly fetchPackageMetaData error for onvif@git+ Error while executing:
18 silly fetchPackageMetaData undefined ls-remote -h -t
18 silly fetchPackageMetaData
18 silly fetchPackageMetaData
18 silly fetchPackageMetaData spawn git ENOENT
19 http fetch GET 200 176ms
20 http fetch GET 200 103ms
21 silly pacote range manifest for request@>= 2.88.2 fetched in 291ms
22 warn deprecated request@2.88.2: request has been deprecated, see
23 silly resolveWithNewModule request@2.88.2 checking installable status
24 timing stage:rollbackFailedOptional Completed in 1ms
25 timing stage:runTopLevelLifecycles Completed in 1444ms
26 silly saveTree redmatic
26 silly saveTree +-- git@0.1.5
26 silly saveTree | -- mime@1.2.9 26 silly saveTree +-- mime@1.2.9 26 silly saveTree -- node-red-contrib-onvif-nodes@0.0.1-beta.12
26 silly saveTree `-- request@2.88.2
27 verbose stack Error: spawn git ENOENT
27 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
27 verbose stack at onErrorNT (internal/child_process.js:469:16)
27 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21)
28 verbose cwd /usr/local/addons/redmatic
29 verbose Linux 5.4.77
30 verbose argv "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-onvif-nodes"
31 verbose node v12.18.4
32 verbose npm v6.14.6
33 error code ENOENT
34 error syscall spawn git
35 error path git
36 error errno ENOENT
37 error enoent Error while executing:
37 error enoent undefined ls-remote -h -t
37 error enoent
37 error enoent
37 error enoent spawn git ENOENT
38 error enoent This is related to npm not being able to find a file.
39 verbose exit [ 1, true ]

Does anyone have a hint as to what this is?

Hi folks,
Does anybody know what can be the problem, because I couldn't help Chris with his issue. Seems he cannot install git on his RaspberryMatic...

I think you need to install git.

Colin, thanks!
Since these nodes are not ready to become available via the node-red palette, I had published a new beta version on npm for Chris. I did that so he could install the node directly from NPM instead from Github. Thought that he would not have to install git in that scenario ...

I don't know why it wants git, but I think that is what the error is saying. The beta version isn't asking for GitHub version of a dependency is it?

Edit, I think it is trying to install onvif from GitHub.

Yes error 18 says exactly that

You guys nailed it again ...
I see now that I use the onvif library dependency from Github:


So the "npm install" will require git to download that dependency.

Reason that I do it like that, is that the npm version of the onvif library is pretty old:


Don't think I can solve this issue then ...

Try to persuade them to release the new one

I have now asked them to publish a new version on NPM. Now sit and wait...

fingers crossed.

You may be able to wrangle something with bundleddependencies - - but I've not tried it for things from git - nor back up to npm... I've only used it for local install packages)

1 Like

Hello there,
Thank you all for trying to solve my problem. I am curious and hope that the solution will also help others.


Can you not install git on your system? That should solve the problem for you. I don't know about RaspberryMatic but on Raspbian that would be
sudo apt install git
and then try the node install again.

Hello @Napoleon,
Andrew has been so kind to publish version 0.6.3 of his onvif package on NPM. I now use in beta14 of my onvif nodes his updated npm package (instead of his Github repo).
So hopefully you can install beta14 without git ...

1 Like

Hello Bart,
so awesome. Now I could install it successfully and it works great. Big thank you for the great help.

Happy holidays to all,

Hi Chris,
Nice to hear that it works finally.
Happy holidays to you too!! :christmas_tree:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.