# NodeRed snap package with git dependency error

**URL:** <https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287>\
**Category:** General\
**Created:** [28 January 2023 10:12 UTC](https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287 "2023-01-28T10:12:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![guyluz11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/guyluz11/32/53620_2.png) [@guyluz11](https://discourse.nodered.org/u/guyluz11)\
**Post date:** [28 January 2023 10:12 UTC](https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287/1 "2023-01-28T10:12:19Z")

</div>

I'm using NodeRed version from snap.  
when I try to install specific package named

node-red-contrib-esphome

> **[node-red-contrib-esphome](https://flows.nodered.org/node/node-red-contrib-esphome)**
>
> Node-RED nodes to ESPhome devices.

I encounter an error about the git can't be found.  
'An unknown git error occurre'

> <https://github.com/twocolors/node-red-contrib-esphome/issues/2>
>
> Getting an error while trying to install this package from the Node-RED ide 
> 
> …!\[image\](https://user-images.githubusercontent.com/9304740/213729617-47f6b649-fc2d-4ece-8b5e-a82e453db1d5.png)
> 
> 
> 
> 
> \`\`\`javascript
> \-----------------------------------------------------------
> 2023-01-20T14:57:34.452Z Install : node-red-contrib-esphome 0.0.2
> 
> 2023-01-20T14:57:34.470Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-esphome@0.0.2
> 2023-01-20T14:57:34.714Z \[err\] npm WARN config production Use \`--omit=dev\` instead.
> 2023-01-20T14:57:36.557Z \[err\] npm
> 2023-01-20T14:57:36.557Z \[err\]  
> 2023-01-20T14:57:36.557Z \[err\] ERR! code
> 2023-01-20T14:57:36.558Z \[err\] ENOENT
> 2023-01-20T14:57:36.558Z \[err\] npm
> 2023-01-20T14:57:36.558Z \[err\]  
> 2023-01-20T14:57:36.558Z \[err\] ERR!
> 2023-01-20T14:57:36.558Z \[err\] syscall
> 2023-01-20T14:57:36.558Z \[err\] spawn git
> 2023-01-20T14:57:36.558Z \[err\] npm
> 2023-01-20T14:57:36.558Z \[err\]  
> 2023-01-20T14:57:36.558Z \[err\] ERR!
> 2023-01-20T14:57:36.558Z \[err\]  
> 2023-01-20T14:57:36.558Z \[err\] path git
> 2023-01-20T14:57:36.559Z \[err\] npm
> 2023-01-20T14:57:36.559Z \[err\] ERR!
> 2023-01-20T14:57:36.559Z \[err\] errno
> 2023-01-20T14:57:36.559Z \[err\] -2
> 2023-01-20T14:57:36.560Z \[err\] npm 
> 2023-01-20T14:57:36.560Z \[err\] ERR! enoent
> 2023-01-20T14:57:36.560Z \[err\] An unknown git error occurred
> 2023-01-20T14:57:36.560Z \[err\] npm
> 2023-01-20T14:57:36.560Z \[err\] ERR! 
> 2023-01-20T14:57:36.560Z \[err\] enoent This is related to npm not being able to find a file.
> 2023-01-20T14:57:36.560Z \[err\] npm 
> 2023-01-20T14:57:36.560Z \[err\] ERR! 
> 2023-01-20T14:57:36.560Z \[err\] enoent 
> 2023-01-20T14:57:36.562Z \[err\] 
> 2023-01-20T14:57:36.562Z \[err\] npm 
> 2023-01-20T14:57:36.562Z \[err\] ERR!
> 2023-01-20T14:57:36.562Z \[err\] A complete log of this run can be found in:
> 2023-01-20T14:57:36.562Z \[err\] npm
> 2023-01-20T14:57:36.562Z \[err\] ERR!
> 2023-01-20T14:57:36.562Z \[err\] /root/snap/node-red/854/.npm/\_logs/2023-01-20T14\_57\_34\_694Z-debug-0.log
> 2023-01-20T14:57:36.570Z rc=254
> \`\`\`

The package use a npm dependency from a git fork.  
I think that this error is only happening because I use the snap version of NodeRed.

Is it possible that NodeRed does not support packages with git dependencies, or that this is just bug in the snap version of it.

Would be happy if some can try it out and let me know.

---

<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:** [28 January 2023 10:17 UTC](https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287/2 "2023-01-28T10:17:15Z")

</div>

The snap runs in a very tight container so it doesn’t have access to things like git or gcc or hardware ports erc

---

<div class="post-metadata">

**Author:** ![guyluz11](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/guyluz11/32/53620_2.png) [@guyluz11](https://discourse.nodered.org/u/guyluz11)\
**Post date:** [8 February 2023 06:14 UTC](https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287/3 "2023-02-08T06:14:45Z")

</div>

Thanks  
The dependency got uploaded to the npm store and now it works.

---

<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:** [22 February 2023 06:14 UTC](https://discourse.nodered.org/t/nodered-snap-package-with-git-dependency-error/74287/4 "2023-02-22T06:14:49Z")

</div>

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