# Unable install to node-red-contrib-grovepi

**URL:** https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325
**Category:** General
**Created:** [23 November 2019 17:01 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325 "2019-11-23T17:01:48Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [23 November 2019 17:01 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/1 "2019-11-23T17:01:49Z")

</div>

Hi there, while i was installing node-red-contrib-grovepi, the following errors occur,

```auto
2019-11-23T15:35:44.962Z [err] ERR! build error
2019-11-23T15:35:44.963Z [err]  
2019-11-23T15:35:44.966Z [err] gyp
2019-11-23T15:35:44.966Z [err] ERR!
2019-11-23T15:35:44.966Z [err] stack
2019-11-23T15:35:44.967Z [err] Error: `make` failed with exit code: 2
2019-11-23T15:35:44.967Z [err] gyp 
2019-11-23T15:35:44.967Z [err] ERR! stack
2019-11-23T15:35:44.968Z [err] at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
2019-11-23T15:35:44.968Z [err] gyp 
2019-11-23T15:35:44.969Z [err] ERR! 
2019-11-23T15:35:44.969Z [err] stack at ChildProcess.emit (events.js:210:5)
2019-11-23T15:35:44.969Z [err] gyp
2019-11-23T15:35:44.969Z [err] ERR!
2019-11-23T15:35:44.970Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
2019-11-23T15:35:44.971Z [err] gyp
2019-11-23T15:35:44.971Z [err] ERR! 
2019-11-23T15:35:44.972Z [err] System Linux 4.19.42-v7+
2019-11-23T15:35:44.972Z [err] gyp
2019-11-23T15:35:44.972Z [err] ERR!
2019-11-23T15:35:44.973Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2019-11-23T15:35:44.973Z [err] gyp 
2019-11-23T15:35:44.973Z [err] ERR! 
2019-11-23T15:35:44.974Z [err] cwd /home/pi/.node-red/node_modules/buffertools
2019-11-23T15:35:44.974Z [err] gyp 
2019-11-23T15:35:44.974Z [err] ERR! 
2019-11-23T15:35:44.975Z [err] node -v v12.13.1
2019-11-23T15:35:44.975Z [err] gyp ERR!
2019-11-23T15:35:44.975Z [err] node-gyp -v
2019-11-23T15:35:44.976Z [err] v5.0.5
2019-11-23T15:35:44.976Z [err] gyp
2019-11-23T15:35:44.976Z [err] ERR! 
2019-11-23T15:35:44.977Z [err] not ok 
2019-11-23T15:35:45.819Z [err] npm ERR! code ELIFECYCLE
2019-11-23T15:35:45.819Z [err] npm ERR! errno 1
2019-11-23T15:35:45.819Z [err] npm ERR! buffertools@2.1.6 install: `node-gyp rebuild`
2019-11-23T15:35:45.819Z [err] npm ERR! Exit status 1
2019-11-23T15:35:45.819Z [err] npm ERR! 
2019-11-23T15:35:45.819Z [err] npm ERR! Failed at the buffertools@2.1.6 install script.
2019-11-23T15:35:45.819Z [err] npm ERR!
2019-11-23T15:35:45.820Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2019-11-23T15:35:45.879Z [err] 
2019-11-23T15:35:45.879Z [err] npm ERR! A complete log of this run can be found in:
2019-11-23T15:35:45.879Z [err] npm ERR!
2019-11-23T15:35:45.880Z [err] /home/pi/.npm/_logs/2019-11-23T15_35_45_835Z-debug.log

```

Anyideas on why it this happening? I have reinstalled node-red based on the documentation in [https://nodered.org/docs/getting-started/raspberrypi](https://nodered.org/docs/getting-started/raspberrypi) . But it is still not working ☹ ☹

---

<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: [24 November 2019 09:10 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/2 "2019-11-24T09:10:37Z")

</div>

Are you installing via the command line or via the node-red palette?  
If command line which directory are you running it from and what command are you runnning?

---

<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: [24 November 2019 09:58 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/3 "2019-11-24T09:58:08Z")

</div>

> [@DragonPigGQ](#):
>
> node-red-contrib-grovepi

I remember I had one of those so I just installed the node on my Pi and it works with an LDR on A0

One thing I noticed is that your system is reporting that you have node 12.31.1 installed and you don't get that with the standard install (you get 10.17.0) and the node (or more likely by look of logs - one of its dependencies buffertools@2.1.6 - might not like that version

[edit] - found this on buffertools github

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

so that looks to be the problem

You either probably need to downgrade your node.js version (I've never done that myself) or start again with a fresh Raspbian image

---

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [24 November 2019 10:12 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/5 "2019-11-24T10:12:45Z")

</div>

Hi Colin,  
I tried to install it through both Command Line and node-red palette, but the outcome is still the same. In command line, i installed it in the ~/.node-red directory using the command npm install node-red-contrib-grovepi .

---

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [24 November 2019 10:41 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/6 "2019-11-24T10:41:07Z")

</div>

Hi Cymplecy,

Thank you so much for pointing that out, I will try your solutions and tell you the outcome !

---

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [24 November 2019 17:09 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/7 "2019-11-24T17:09:14Z")

</div>

Hi Cymplecy,

I had downgraded node.js version to 10.17.0 using the commands found in this link [https://www.surrealcms.com/blog/how-to-upgrade-or-downgrade-nodejs-using-npm.html](https://www.surrealcms.com/blog/how-to-upgrade-or-downgrade-nodejs-using-npm.html) and it works, thank you so much!!

---

<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: [24 November 2019 17:10 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/8 "2019-11-24T17:10:44Z")

</div>

2 wins then - your fixed and you've found a easy downgrade method for others to use 🙂

---

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [24 November 2019 17:16 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/9 "2019-11-24T17:16:55Z")

</div>

Yes! 😄 The downgrade method is much easier than I thought, anyway one thing to take note is that you need to start a new terminal to change the node.js to a specific version after you downloaded it.

---

<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: [24 November 2019 17:35 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/10 "2019-11-24T17:35:13Z")

</div>

> [@DragonPigGQ](#):
>
> you need to start a new terminal to change the node.js to a specific version

Is that every time you run Node-RED or just once?

---

<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: [24 November 2019 18:33 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/11 "2019-11-24T18:33:14Z")

</div>

> [@DragonPigGQ](#):
>
> I had downgraded node.js version to 10.17.0 using the commands found in this link [https://www.surrealcms.com/blog/how-to-upgrade-or-downgrade-nodejs-using-npm.html](https://www.surrealcms.com/blog/how-to-upgrade-or-downgrade-nodejs-using-npm.html) and it works,

Add an issue to the node's git page saying that it does not work with node 12.x so that others will see that there is a problem.  
Also note that downgrading to node 10.x is not a long term solution as at some point node 10.x will become obsolete.

---

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [24 November 2019 23:55 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/12 "2019-11-24T23:55:29Z")

</div>

Just once will do 😄 , it will only happen when you want to change to a version that you haven’t downloaded, the system will download that specific version first, and then you have to start a new terminal to enter the command again to take effect.

---

<div class="post-metadata">

### Author: ![DragonPigGQ](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dragonpiggq/32/14528_2.png) [@DragonPigGQ](https://discourse.nodered.org/u/DragonPigGQ)
#### Post date: [24 November 2019 23:59 UTC](https://discourse.nodered.org/t/unable-install-to-node-red-contrib-grovepi/18325/13 "2019-11-24T23:59:39Z")

</div>

You are right!
