Node-red snap module install fails with "gyp ERR! stack Error: not found: make"

Ubuntu node-red snap (3.1.0) fails to install add-on module package through “Manage palette” with error gyp ERR! stack Error: not found: make

trying to install manually using

node-red.npm i --unsafe-perm node-red-contrib

fails in the exactly same way make is present on the system. the build-essentials package is installed

Is there some interface missing that causes snap to not be able to find and use the make package ?

here is the complete log:

    -----------------------------------------------------------
    2023-10-04T12:37:26.963Z Install : node-red-contrib-smartmeter 0.6.3

    2023-10-04T12:37:27.060Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-smartmeter@0.6.3
    2023-10-04T12:37:27.587Z [err] npm
    2023-10-04T12:37:27.587Z [err]  WARN config production Use `--omit=dev` instead.
    2023-10-04T12:37:36.227Z [err] npm
    2023-10-04T12:37:36.227Z [err]  ERR! code 1
    2023-10-04T12:37:36.227Z [err] npm ERR! path /var/snap/node-red/879/node_modules/@serialport/bindings
    2023-10-04T12:37:36.229Z [err] npm ERR!
    2023-10-04T12:37:36.229Z [err]  command failed
    2023-10-04T12:37:36.229Z [err] npm ERR! command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
    2023-10-04T12:37:36.229Z [err] npm 
    2023-10-04T12:37:36.229Z [err] ERR! prebuild-install warn install No prebuilt binaries found (target=18.17.1 runtime=node arch=x64 libc= platform=linux)
    2023-10-04T12:37:36.229Z [err] npm ERR! gyp info it worked if it ends with ok
    2023-10-04T12:37:36.229Z [err] npm ERR! gyp info using node-gyp@9.3.1
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info using node@18.17.1 | linux | x64
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn /usr/bin/python3
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args [
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   'binding.gyp',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-f',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   'make',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-I',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '/var/snap/node-red/879/node_modules/@serialport/bindings/build/config.gypi',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-I',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-I',
    2023-10-04T12:37:36.230Z [err] npm
    2023-10-04T12:37:36.230Z [err]  ERR! gyp info spawn args   '/root/snap/node-red/879/.cache/node-gyp/18.17.1/include/node/common.gypi',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Dvisibility=default',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Dnode_root_dir=/root/snap/node-red/879/.cache/node-gyp/18.17.1',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Dnode_lib_file=/root/snap/node-red/879/.cache/node-gyp/18.17.1/<(target_arch)/node.lib',
    2023-10-04T12:37:36.230Z [err] npm ERR!
    2023-10-04T12:37:36.230Z [err]  gyp info spawn args   '-Dmodule_root_dir=/var/snap/node-red/879/node_modules/@serialport/bindings',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Dnode_engine=v8',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '--depth=.',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '--no-parallel',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '--generator-output',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   'build',
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args   '-Goutput_dir=.'
    2023-10-04T12:37:36.230Z [err] npm ERR! gyp info spawn args ]
    2023-10-04T12:37:36.230Z [err] npm 
    2023-10-04T12:37:36.231Z [err] ERR! gyp ERR! build error 
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack Error: not found: make
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at getNotFoundError (/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:10:17)
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at /snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:57:18
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at step (/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:54:21)
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at /snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:71:22
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at new Promise (<anonymous>)
    2023-10-04T12:37:36.231Z [err] npm ERR!
    2023-10-04T12:37:36.231Z [err]  gyp ERR! stack     at subStep (/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:69:33)
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at /snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/node_modules/which/which.js:80:22
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at /snap/node-red/879/lib/node_modules/npm/node_modules/isexe/index.js:42:5
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! stack     at /snap/node-red/879/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! System Linux 5.15.0-84-generic
    2023-10-04T12:37:36.231Z [err] npm 
    2023-10-04T12:37:36.231Z [err] ERR! gyp ERR! command "/snap/node-red/879/bin/node" "/snap/node-red/879/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! cwd /var/snap/node-red/879/node_modules/@serialport/bindings
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! node -v v18.17.1
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! node-gyp -v v9.3.1
    2023-10-04T12:37:36.231Z [err] npm ERR! gyp ERR! not ok
    2023-10-04T12:37:36.233Z [err] 
    2023-10-04T12:37:36.233Z [err] npm ERR! A complete log of this run can be found in: /root/snap/node-red/879/.npm/_logs/2023-10-04T12_37_27_543Z-debug-0.log
    2023-10-04T12:37:36.246Z rc=1