# Error installing HX711 node

**URL:** <https://discourse.nodered.org/t/error-installing-hx711-node/76483>\
**Category:** General\
**Created:** [12 March 2023 19:07 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483 "2023-03-12T19:07:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blubber](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Blubber](https://discourse.nodered.org/u/Blubber)\
**Post date:** [12 March 2023 19:07 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483/1 "2023-03-12T19:07:01Z")

</div>

Hi,  
I am quite inexperienced in working with Node-RED.  
I want to build a scale with a Raspberry Pi.  
The installation of a HX711 node is stopped by an error.

> **Error log**
>
> 2023-03-12T18:53:49.224Z Installieren : node-red-contrib-hx711 1.0.7
> 
> 2023-03-12T18:53:49.338Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-hx711@1.0.7  
> 2023-03-12T18:53:50.557Z [err] npm  
> 2023-03-12T18:53:50.559Z [err] WARN config  
> 2023-03-12T18:53:50.559Z [err] production Use `--omit=dev` instead.  
> 2023-03-12T18:54:05.640Z [err] npm  
> 2023-03-12T18:54:05.640Z [err]  
> 2023-03-12T18:54:05.641Z [err] ERR! code 1  
> 2023-03-12T18:54:05.641Z [err] npm ERR! path  
> 2023-03-12T18:54:05.642Z [err] /data/node\_modules/@shroudedcode/hx711  
> 2023-03-12T18:54:05.646Z [err] npm ERR! command failed  
> 2023-03-12T18:54:05.647Z [err] npm ERR! command sh -c node-gyp rebuild  
> 2023-03-12T18:54:05.647Z [err] npm ERR!  
> 2023-03-12T18:54:05.647Z [err] make: Entering directory '/data/node\_modules/@shroudedcode/hx711/build'  
> 2023-03-12T18:54:05.647Z [err] npm ERR! CC(target) Release/obj.target/nothing/../../node-addon-api/src/nothing.o  
> 2023-03-12T18:54:05.647Z [err] npm ERR! AR(target) Release/obj.target/../../node-addon-api/src/nothing.a  
> 2023-03-12T18:54:05.647Z [err] npm ERR! COPY Release/nothing.a  
> 2023-03-12T18:54:05.647Z [err] npm ERR!  
> 2023-03-12T18:54:05.647Z [err] CXX(target) Release/obj.target/hx711/source/binding.o  
> 2023-03-12T18:54:05.647Z [err] npm ERR! CXX(target) Release/obj.target/hx711/source/hx711.o  
> 2023-03-12T18:54:05.647Z [err] npm ERR! make: Leaving directory '/data/node\_modules/@shroudedcode/hx711/build'  
> 2023-03-12T18:54:05.648Z [err] npm ERR! gyp info it worked if it ends with ok  
> 2023-03-12T18:54:05.648Z [err] npm  
> 2023-03-12T18:54:05.648Z [err] ERR! gyp info using node-gyp@9.0.0  
> 2023-03-12T18:54:05.648Z [err] npm ERR! gyp info using node@16.16.0 | linux | arm  
> 2023-03-12T18:54:05.648Z [err] npm ERR! gyp info find Python using Python version 3.10.5 found at "/usr/bin/python3"  
> 2023-03-12T18:54:05.648Z [err] npm ERR!  
> 2023-03-12T18:54:05.648Z [err] gyp info spawn /usr/bin/python3  
> 2023-03-12T18:54:05.648Z [err] npm ERR! gyp info spawn args [  
> 2023-03-12T18:54:05.648Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/gyp/gyp\_main.py',  
> 2023-03-12T18:54:05.648Z [err] npm ERR! gyp info spawn args 'binding.gyp',  
> 2023-03-12T18:54:05.648Z [err] npm  
> 2023-03-12T18:54:05.649Z [err] ERR! gyp info spawn args '-f',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args 'make',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '-I',  
> 2023-03-12T18:54:05.649Z [err] npm  
> 2023-03-12T18:54:05.649Z [err] ERR! gyp info spawn args '/data/node\_modules/@shroudedcode/hx711/build/config.gypi',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '-I',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/addon.gypi',  
> 2023-03-12T18:54:05.649Z [err] npm ERR!  
> 2023-03-12T18:54:05.649Z [err] gyp info spawn args '-I',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.16.0/include/node/common.gypi',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '-Dlibrary=shared\_library',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '-Dvisibility=default',  
> 2023-03-12T18:54:05.649Z [err] npm  
> 2023-03-12T18:54:05.649Z [err] ERR! gyp info spawn args '-Dnode\_root\_dir=/root/.cache/node-gyp/16.16.0',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '-Dnode\_gyp\_dir=/usr/local/lib/node\_modules/npm/node\_modules/node-gyp',  
> 2023-03-12T18:54:05.649Z [err] npm ERR! gyp info spawn args '-Dnode\_lib\_file=/root/.cache/node-gyp/16.16.0/\<(target\_arch)/node.lib',  
> 2023-03-12T18:54:05.649Z [err] npm ERR!  
> 2023-03-12T18:54:05.650Z [err] gyp info spawn args '-Dmodule\_root\_dir=/data/node\_modules/@shroudedcode/hx711',  
> 2023-03-12T18:54:05.650Z [err] npm ERR! gyp info spawn args '-Dnode\_engine=v8',  
> 2023-03-12T18:54:05.650Z [err] npm ERR! gyp info spawn args '--depth=.',  
> 2023-03-12T18:54:05.650Z [err] npm  
> 2023-03-12T18:54:05.650Z [err] ERR! gyp info spawn args '--no-parallel',  
> 2023-03-12T18:54:05.650Z [err] npm ERR! gyp info spawn args '--generator-output',  
> 2023-03-12T18:54:05.650Z [err] npm ERR! gyp info spawn args 'build',  
> 2023-03-12T18:54:05.650Z [err] npm  
> 2023-03-12T18:54:05.650Z [err] ERR! gyp info spawn args '-Goutput\_dir=.'  
> 2023-03-12T18:54:05.650Z [err] npm ERR! gyp info spawn args ]  
> 2023-03-12T18:54:05.650Z [err] npm ERR!  
> 2023-03-12T18:54:05.650Z [err] gyp info spawn make  
> 2023-03-12T18:54:05.650Z [err] npm ERR! gyp info spawn args ['BUILDTYPE=Release', '-C', 'build']  
> 2023-03-12T18:54:05.650Z [err] npm ERR! ../source/hx711.cpp:4:10: fatal error: wiringPi.h: No such file or directory  
> 2023-03-12T18:54:05.650Z [err] npm ERR!  
> 2023-03-12T18:54:05.651Z [err] 4 | #include \<wiringPi.h\>  
> 2023-03-12T18:54:05.651Z [err] npm ERR! | ^ ~~~~~~~~~~~  
> 2023-03-12T18:54:05.651Z [err] npm ERR! compilation terminated.  
> 2023-03-12T18:54:05.651Z [err] npm ERR!  
> 2023-03-12T18:54:05.651Z [err] make: \*\*\* [hx711.target.mk:117: Release/obj.target/hx711/source/hx711.o] Error 1  
> 2023-03-12T18:54:05.651Z [err] npm ERR! gyp ERR! build error  
> 2023-03-12T18:54:05.651Z [err] npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2  
> 2023-03-12T18:54:05.651Z [err] npm  
> 2023-03-12T18:54:05.651Z [err] ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/lib/build.js:194:23)  
> 2023-03-12T18:54:05.651Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)  
> 2023-03-12T18:54:05.651Z [err] npm ERR! gyp ERR! stack at Process.ChildProcess.\_handle.onexit (node:internal/child\_process:291:12)  
> 2023-03-12T18:54:05.651Z [err] npm  
> 2023-03-12T18:54:05.651Z [err] ERR! gyp ERR! System Linux 5.15.84-v7l+  
> 2023-03-12T18:54:05.651Z [err] npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node\_modules/npm/node\_modules/node-gyp/bin/node-gyp.js" "rebuild"  
> 2023-03-12T18:54:05.651Z [err] npm ERR! gyp ERR! cwd /data/node\_modules/@shroudedcode/hx711  
> 2023-03-12T18:54:05.652Z [err] npm ERR! gyp ERR! node -v v16.16.0  
> 2023-03-12T18:54:05.652Z [err] npm ERR! gyp ERR! node-gyp -v v9.0.0  
> 2023-03-12T18:54:05.652Z [err] npm ERR!  
> 2023-03-12T18:54:05.652Z [err] gyp ERR! not ok  
> 2023-03-12T18:54:05.658Z [err]  
> 2023-03-12T18:54:05.658Z [err] npm ERR! A complete log of this run can be found in:  
> 2023-03-12T18:54:05.658Z [err] npm  
> 2023-03-12T18:54:05.658Z [err] ERR! /data/.npm/\_logs/2023-03-12T18\_53\_50\_483Z-debug-0.log  
> 2023-03-12T18:54:05.673Z rc=1

I have installed WiringPi, although the official version is no longer available. Where is the problem?  
[https://github.com/WiringPi/WiringPi/tree/master/wiringPi](https://github.com/WiringPi/WiringPi/tree/master/wiringPi)

Is there an easier way to include a load cell in Node-RED?

Thanks for your help

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [12 March 2023 19:35 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483/2 "2023-03-12T19:35:17Z")

</div>

Hi @Blubber welcome to the forum.

When ever you are opening a thread to ask for help you want to give some basic information

1. what version of NR and node.js (you can get this from the Node-RED startup log)
2. what device and os/release are you using?
3. are you using 'HomeAssistant' or a Docker image?

How did you do the install, via the 'Manager palette' option or from a command line?

When ever I have an issue with a node, I always go to the node's GitHub page to see what issues there may be. You can get to it by clicking the `flows` tab here on the forum, enter the node's name, clicking on the node and then clicking the 'GitHub' link.

In your case if you go to the [GitHub issues](https://github.com/rtoenniges/node-red-contrib-hx711/issues) you will see two issues about installing the node.

You can open another issue and maybe the author of the node will help you out, but unfortunately the author doesn't seem to be responding to issues so you maybe out of luck with this node.

---

<div class="post-metadata">

**Author:** ![Blubber](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Blubber](https://discourse.nodered.org/u/Blubber)\
**Post date:** [13 March 2023 19:42 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483/3 "2023-03-13T19:42:04Z")

</div>

The node-RED version is 3.0.2 and the node.js version is 16.16.0

I use a RaspberryPi 4B 2GB  
PRETTY\_NAME=Raspbian GNU/Linux 11 (bullseye)"  
NAME="Raspbian GNU/Linux"  
VERSION\_ID="11"  
VERSION="11 (bullseye)"  
VERSION\_CODENAME=bullseye

I am using a docker image. Installed via IOTStack

First I tried this via Manager Palette and then via command line. Gives the error on both.

It just always says it didn't find WiringPi.h and then aborts. Should I have installed WiringPi directly in the Docker container somehow? I'm not quite through the work with containers yet in most tutorials but it is used so.

How do you install a node that is not available in the manager palette but only via Github? I would try it for example with the [GitHub - rtoenniges/node-red-contrib-hx711: Simple NodeRed-Node to get the value from a hx711 attached to RaspberryPis GPIOs.](https://github.com/rtoenniges/node-red-contrib-hx711).  
If I understand correctly I have to do this via docker exec -it.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 March 2023 01:06 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483/4 "2023-03-14T01:06:09Z")

</div>

Normally if you want to install a node without using the ‘Manage palette’ option, you would

1. shut down node-red
2. change to the .node-red folder
3. run ‘npm install node-red-????? Where the ????? Would be the name of the node.

However, having never used Docker, I don’t know if that is the procedure to use.

---

<div class="post-metadata">

**Author:** ![Blubber](https://avatars.discourse-cdn.com/v4/letter/b/47e85d/32.png) [@Blubber](https://discourse.nodered.org/u/Blubber)\
**Post date:** [14 March 2023 11:22 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483/5 "2023-03-14T11:22:06Z")

</div>

As it turns out, a Docker container cannot access files outside the container, or only with certain permissions. That's why it can't find WiringPi.h either.  
Because this is too complicated for me, I now just installed Node-RED normally on the Pi without Docker. The HX711 module could now be installed without problems.

Thanks zenofmud for your help. The hint if I run it normally or via Docker was good.

---

<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:** [28 March 2023 11:22 UTC](https://discourse.nodered.org/t/error-installing-hx711-node/76483/6 "2023-03-28T11:22:49Z")

</div>

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