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

**URL:** https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773
**Category:** General
**Created:** [19 December 2020 20:11 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773 "2020-12-19T20:11:11Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Napoleon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/napoleon/32/33984_2.png) [@Napoleon](https://discourse.nodered.org/u/Napoleon)
#### Post date: [19 December 2020 20:11 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/1 "2020-12-19T20:11:12Z")

</div>

Hello,

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  
> vif-nodes  
> npm WARN deprecated request@2.88.2: request has been deprecated, see [https://github.com/request/request/issues/3142](https://github.com/request/request/issues/3142)  
> 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 [GitHub - agsh/onvif: ONVIF node.js implementation](https://github.com/agsh/onvif.git)  
> 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 [https://registry.npmjs.org/node-red-contrib-onvif-nodes](https://registry.npmjs.org/node-red-contrib-onvif-nodes) 280ms  
> 8 http fetch GET 200 [https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.12.tgz](https://registry.npmjs.org/node-red-contrib-onvif-nodes/-/node-red-contrib-onvif-nodes-0.0.1-beta.12.tgz) 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+https://github.com/agsh/onvif.git Error while executing:  
> 18 silly fetchPackageMetaData undefined ls-remote -h -t [GitHub - agsh/onvif: ONVIF node.js implementation](https://github.com/agsh/onvif.git)  
> 18 silly fetchPackageMetaData  
> 18 silly fetchPackageMetaData  
> 18 silly fetchPackageMetaData spawn git ENOENT  
> 19 http fetch GET 200 [https://registry.npmjs.org/request](https://registry.npmjs.org/request) 176ms  
> 20 http fetch GET 200 [https://registry.npmjs.org/request/-/request-2.88.2.tgz](https://registry.npmjs.org/request/-/request-2.88.2.tgz) 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 [https://github.com/request/request/issues/3142](https://github.com/request/request/issues/3142)  
> 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 [GitHub - agsh/onvif: ONVIF node.js implementation](https://github.com/agsh/onvif.git)  
> 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?

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [19 December 2020 20:32 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/2 "2020-12-19T20:32:48Z")

</div>

Hi folks,  
Does anybody know what can be the problem, because I couldn't help Chris with his [issue](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/issues/19#issuecomment-748311466). Seems he cannot install git on his RaspberryMatic...  
Thanks!  
Bart

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [20 December 2020 07:37 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/3 "2020-12-20T07:37:52Z")

</div>

I think you need to install git.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [20 December 2020 07:50 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/4 "2020-12-20T07:50:38Z")

</div>

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 ...

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [20 December 2020 08:25 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/5 "2020-12-20T08:25:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [20 December 2020 08:33 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/6 "2020-12-20T08:33:15Z")

</div>

Yes error 18 says exactly that

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [20 December 2020 08:45 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/7 "2020-12-20T08:45:43Z")

</div>

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

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/3/239b988cc8e47b736f66f7906806a254b538ace8.png)

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:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/1/2182fe512237d39b7cd9bd2b852e1a888e9a18b3.png)

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

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [20 December 2020 08:49 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/8 "2020-12-20T08:49:41Z")

</div>

Try to persuade them to release the new one

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [20 December 2020 10:21 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/9 "2020-12-20T10:21:43Z")

</div>

I have now [asked](https://github.com/agsh/onvif/issues/180) them to publish a new version on NPM. Now sit and wait...

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [20 December 2020 10:32 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/10 "2020-12-20T10:32:06Z")

</div>

fingers crossed.

You may be able to wrangle something with bundleddependencies - [https://docs.npmjs.com/cli/v6/configuring-npm/package-json#bundleddependencies](https://docs.npmjs.com/cli/v6/configuring-npm/package-json#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)

---

<div class="post-metadata">

### Author: ![Napoleon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/napoleon/32/33984_2.png) [@Napoleon](https://discourse.nodered.org/u/Napoleon)
#### Post date: [21 December 2020 16:26 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/11 "2020-12-21T16:26:11Z")

</div>

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

Cheers,  
Chris

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [21 December 2020 16:48 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/12 "2020-12-21T16:48:14Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [23 December 2020 17:10 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/13 "2020-12-23T17:10:32Z")

</div>

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 ...

---

<div class="post-metadata">

### Author: ![Napoleon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/napoleon/32/33984_2.png) [@Napoleon](https://discourse.nodered.org/u/Napoleon)
#### Post date: [23 December 2020 17:54 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/14 "2020-12-23T17:54:55Z")

</div>

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,  
Chris

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [23 December 2020 18:02 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/15 "2020-12-23T18:02:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 February 2021 18:02 UTC](https://discourse.nodered.org/t/error-while-installing-npm-node-red-contrib-onvif-nodes/37773/16 "2021-02-21T18:02:16Z")

</div>

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