Node-RED Installation of node-red-contrib-m-bus fails

Creating a bug report/issue

Required Information

  • DietPi version | 8.19.1
  • Distro version | bookworm 0
  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • Architecture | arm64
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | (5V 3A Official USB-C Power Supply)
  • SD card used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (Node-RED)
  • Was the software title installed freshly or updated/migrated? Yes
  • Can this issue be replicated on a fresh installation of DietPi? Yes
    ← If you sent a “dietpi-bugreport”, please paste the ID here →
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. Install ‘Node-Red’ (dietpi-software)
  2. Connect to Node-RED (web browser)
  3. Menu->Manage palette->Install->node-red-contrib-m-bus->Install

Expected behaviour

  • Should be installed

Actual behaviour

  • Install failed

Extra details

  • Here is the log

2023-07-16T11:02:03.064Z Install : node-red-contrib-m-bus 3.0.0

2023-07-16T11:02:02.766Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-m-bus@3.0.0
2023-07-16T11:02:03.688Z [err] npm
2023-07-16T11:02:03.689Z [err]  WARN
2023-07-16T11:02:03.689Z [err]  config production Use `--omit=dev` instead.
2023-07-16T11:02:13.645Z [err] npm
2023-07-16T11:02:13.645Z [err]  ERR! code 1
2023-07-16T11:02:13.646Z [err] npm ERR!
2023-07-16T11:02:13.646Z [err]  path /mnt/dietpi_userdata/node-red/node_modules/node-mbus
2023-07-16T11:02:13.651Z [err] npm ERR!
2023-07-16T11:02:13.651Z [err]  command failed
2023-07-16T11:02:13.651Z [err] npm
2023-07-16T11:02:13.652Z [err]  ERR! command sh -c node-gyp rebuild
2023-07-16T11:02:13.652Z [err] npm ERR!
2023-07-16T11:02:13.652Z [err]  gyp info it worked if it ends with ok
2023-07-16T11:02:13.652Z [err] npm ERR! gyp info using node-gyp@9.4.0
2023-07-16T11:02:13.652Z [err] npm ERR! gyp info using node@20.4.0 | linux | arm64
2023-07-16T11:02:13.652Z [err] npm
2023-07-16T11:02:13.652Z [err]  ERR! gyp info find Python using Python version 3.11.2 found at "/usr/bin/python3"
2023-07-16T11:02:13.653Z [err] npm 
2023-07-16T11:02:13.653Z [err] ERR! gyp info spawn /usr/bin/python3
2023-07-16T11:02:13.653Z [err] npm ERR! gyp info spawn args [
2023-07-16T11:02:13.653Z [err] npm ERR!
2023-07-16T11:02:13.653Z [err]  gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
2023-07-16T11:02:13.653Z [err] npm ERR! gyp info spawn args   'binding.gyp',
2023-07-16T11:02:13.653Z [err] npm ERR! gyp info spawn args   '-f',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   'make',
2023-07-16T11:02:13.654Z [err] npm ERR!
2023-07-16T11:02:13.654Z [err]  gyp info spawn args   '-I',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   '/mnt/dietpi_userdata/node-red/node_modules/node-mbus/build/config.gypi',
2023-07-16T11:02:13.654Z [err] npm 
2023-07-16T11:02:13.654Z [err] ERR! gyp info spawn args   '-I',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
2023-07-16T11:02:13.654Z [err] npm
2023-07-16T11:02:13.654Z [err]  ERR! gyp info spawn args   '-I',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   '/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.4.0/include/node/common.gypi',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   '-Dvisibility=default',
2023-07-16T11:02:13.654Z [err] npm ERR! gyp info spawn args   '-Dnode_root_dir=/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.4.0',
2023-07-16T11:02:13.654Z [err] npm
2023-07-16T11:02:13.655Z [err]  ERR! gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
2023-07-16T11:02:13.655Z [err] npm ERR! gyp info spawn args   '-Dnode_lib_file=/mnt/dietpi_userdata/node-red/.cache/node-gyp/20.4.0/<(target_arch)/node.lib',
2023-07-16T11:02:13.655Z [err] npm
2023-07-16T11:02:13.655Z [err]  ERR! gyp info spawn args   '-Dmodule_root_dir=/mnt/dietpi_userdata/node-red/node_modules/node-mbus',
2023-07-16T11:02:13.655Z [err] npm ERR!
2023-07-16T11:02:13.655Z [err]  gyp info spawn args   '-Dnode_engine=v8',
2023-07-16T11:02:13.655Z [err] npm ERR! gyp info spawn args   '--depth=.',
2023-07-16T11:02:13.655Z [err] npm
2023-07-16T11:02:13.655Z [err]  ERR! gyp info spawn args   '--no-parallel',
2023-07-16T11:02:13.655Z [err] npm ERR!
2023-07-16T11:02:13.655Z [err]  gyp info spawn args   '--generator-output',
2023-07-16T11:02:13.655Z [err] npm ERR! gyp info spawn args   'build',
2023-07-16T11:02:13.655Z [err] npm ERR! gyp info spawn args   '-Goutput_dir=.'
2023-07-16T11:02:13.655Z [err] npm ERR!
2023-07-16T11:02:13.660Z [err]  gyp info spawn args ]
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! build error 
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack Error: not found: make
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17)
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at step (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21)
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at subStep (/usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33)
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! System Linux 6.1.21-v8+
2023-07-16T11:02:13.660Z [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-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! cwd /mnt/dietpi_userdata/node-red/node_modules/node-mbus
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! node -v v20.4.0
2023-07-16T11:02:13.660Z [err] n
pm ERR! gyp ERR! node-gyp -v v9.4.0
2023-07-16T11:02:13.660Z [err] npm ERR! gyp ERR! not ok
2023-07-16T11:02:13.683Z [err] 
2023-07-16T11:02:13.684Z [err] npm ERR!
2023-07-16T11:02:13.684Z [err]  A complete log of this run can be found in: /mnt/dietpi_userdata/node-red/.npm/_logs/2023-07-16T11_02_03_576Z-debug-0.log
2023-07-16T11:02:13.722Z rc=1

It works fine on Raspberry Pi OS 64bit Lite

Did you installed build tools like make?

Thanks for your answer Joulinar.
I installed ‘build-essential’ from root, rebooted and …
Look at the log file
log.txt (13,6 Ko)