# Node-red-contrib-i2c fails to install

**URL:** https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774
**Category:** General
**Created:** [4 December 2019 05:08 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774 "2019-12-04T05:08:51Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [2 March 2020 21:17 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/63 "2020-03-02T21:17:40Z")

</div>

Have you checked the more detailed install debug log? Certainly that error doesn't really tell us much.

What version of Rasbian are you using?

---

<div class="post-metadata">

### Author: ![PiNeuling](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@PiNeuling](https://discourse.nodered.org/u/PiNeuling)
#### Post date: [2 March 2020 21:29 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/64 "2020-03-02T21:29:36Z")

</div>

I'm using the Pi 3 B  
I'm not sure what you need from the log. I'm not able the share the whole log, because it have more than 77k characters

---

<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: [2 March 2020 21:32 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/65 "2020-03-02T21:32:59Z")

</div>

> [@PiNeuling](#):
>
> I also tried to install the i2c-bus and tried all your solutions, but its still not working.

You say you tried all the solutions, but then show the method that we know doesn't work. What happens if you do as recommended in the preceding posts  
`npm install --unsafe-perm https://github.com/nielsnl68/node-red-contrib-i2c`

---

<div class="post-metadata">

### Author: ![PiNeuling](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@PiNeuling](https://discourse.nodered.org/u/PiNeuling)
#### Post date: [2 March 2020 21:40 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/66 "2020-03-02T21:40:51Z")

</div>

yes, you're right. but I also tried this solution:

```auto
pi@raspberrypi:~/.node-red $ npm install --unsafe-perm https://github.com/nielsnl68/node-red-contrib-i2c
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 https://github.com/nielsnl68/node-red-contrib-i2c.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! /home/pi/.npm/_logs/2020-03-02T21_38_32_717Z-debug.log

```

---

<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: [2 March 2020 21:41 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/67 "2020-03-02T21:41:26Z")

</div>

That is because you need git installed  
`sudo apt install git`

---

<div class="post-metadata">

### Author: ![PiNeuling](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@PiNeuling](https://discourse.nodered.org/u/PiNeuling)
#### Post date: [2 March 2020 21:45 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/68 "2020-03-02T21:45:03Z")

</div>

> [@Colin](#):
>
> npm install --unsafe-perm [GitHub - nielsnl68/node-red-contrib-i2c: This set of node-red nodes communicate with the Raspberry Pi I2C driver and uses the I2C-bus package.](https://github.com/nielsnl68/node-red-contrib-i2c)

guys you're awesome.

thx a lot

---

<div class="post-metadata">

### Author: ![tenzinlote](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tenzinlote](https://discourse.nodered.org/u/tenzinlote)
#### Post date: [10 April 2020 18:49 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/69 "2020-04-10T18:49:51Z")

</div>

hey vlturner,

if you can't install the node-red-contrib-i2c(fails).

I had these kinds of problems too, before you install anything.  
first of all, if you have node-red-contrib-i2 modules inside your node\_modules -\> delete it.

You should have these 3 modules in side your "node\_modules"

- Bindings
- i2c-bus
- nan

If you don't have them inside your .node-red-\>node\_modules, then put them inside there.  
After that, you can download the "node-red-contrib-i2c" module from the Manange palette.

link to the 3 modules -\> [https://github.com/tenzinlote/i2c\_install](https://github.com/tenzinlote/i2c_install)

Best regards,

Tenzin Lote

---

<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: [10 April 2020 21:22 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/70 "2020-04-10T21:22:08Z")

</div>

Do you mean that you should manually install those modules before trying to install i2c?

---

<div class="post-metadata">

### Author: ![tenzinlote](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tenzinlote](https://discourse.nodered.org/u/tenzinlote)
#### Post date: [11 April 2020 12:32 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/71 "2020-04-11T12:32:05Z")

</div>

yes, only the 3 modules

---

<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: [11 April 2020 14:45 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/72 "2020-04-11T14:45:58Z")

</div>

If the node needs those modules then they should be declared as dependencies in the node's package.json, then they would be automatically installed. If they are not it would be good to raise an issue on the node's github page.

---

<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: [11 April 2020 15:15 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/73 "2020-04-11T15:15:14Z")

</div>

Colin does the link you provided not long ago not work anymore ?

---

<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: [11 April 2020 20:33 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/74 "2020-04-11T20:33:51Z")

</div>

Sorry, which link?

---

<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: [11 April 2020 20:37 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/75 "2020-04-11T20:37:18Z")

</div>

This one from Mar 2- [Node-red-contrib-i2c fails to install](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/65)

---

<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: [11 April 2020 20:41 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/76 "2020-04-11T20:41:54Z")

</div>

@tenzinlote appeared to be suggesting that in addition it is necessary to manually install the modules he mentioned.

---

<div class="post-metadata">

### Author: ![glucaizzo](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@glucaizzo](https://discourse.nodered.org/u/glucaizzo)
#### Post date: [23 May 2020 16:44 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/77 "2020-05-23T16:44:46Z")

</div>

hi, I am a novice user of nodered, I am using a raspberry pi3 model B, I have run the setup of nodered as indicated on the site; I have a series of I2C sensors, but from what I could understand I2C + NodeRed + raspberry there is no way but to develop a new addon, possible? what you see around, node-red-contrib-i2c practically doesn't work with the latest versions of nodered and you would have to jump through hoops to make it work, possible? in the meantime I have removed nodered and I am using python directly for my application, but it seems a real shame, thanks, Gianluca

---

<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: [23 May 2020 17:03 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/78 "2020-05-23T17:03:07Z")

</div>

You should be able to solve this by calling the python code from node red.

---

<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: [29 May 2020 12:43 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/79 "2020-05-29T12:43:49Z")

</div>

Hi All - Thanks to Niels I have managed to get this node updated to use the latest i2c-bus package underneath - so this should now install directly just fine. Hopefully that should now compile ok for node10 and 12 (and hopefully 14... fingers crossed)

Now on flows as v0.6.0

---

<div class="post-metadata">

### Author: ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)
#### Post date: [29 May 2020 13:00 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/80 "2020-05-29T13:00:50Z")

</div>

Brilliant !!!!!!! 🙂

---

<div class="post-metadata">

### Author: ![SonoraTechnical](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sonoratechnical/32/20033_2.png) [@SonoraTechnical](https://discourse.nodered.org/u/SonoraTechnical)
#### Post date: [30 May 2020 16:26 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/81 "2020-05-30T16:26:32Z")

</div>

It's great news that it is being brought in directly under the oversight of NodeRED folks. I use those nodes allot.  
Some of the initial improvements for a v0.6.1 would be to just to augment the documentation with a few use case scenarios. It took some struggling, but eventually myself and others did learn how to exploit this node to do nice things. (particularly with the Atlas-Sci EZO circuits).

---

<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: [30 May 2020 16:30 UTC](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774/82 "2020-05-30T16:30:43Z")

</div>

Pull requests now gratefully accepted so feel free to write some docs

[Previous page](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774.md?page=3)

[Next page](https://discourse.nodered.org/t/node-red-contrib-i2c-fails-to-install/18774.md?page=5)
