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
Is there an easier way to include a load cell in Node-RED?
Thanks for your help