I'm trying to install the node-red-contrib-opcua-server node in Node Red running in Ubuntu 20.04 that is running on a RPi 4. It has failed a couple of times.
I have run update/upgrade and made sure nodejs was installed. I've tried installing this node using the command line and via the Node Red GUI.
Below is the logged information for the last install attempt. The logged info doesn't say much to me so I'm hoping that the Linux gurus out there can shed some light on what is needed to successfully install this component.
2020-08-24T16:30:34.369Z Install : node-red-contrib-opcua-server 0.4.1
2020-08-24T16:30:34.445Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix="~" --production node-red-contrib-opcua-server@0.4.1
2020-08-24T16:30:49.312Z [out]
2020-08-24T16:30:49.312Z [out] > deasync@0.1.20 install /home/mikeallgood/.node-red/node_modules/deasync
2020-08-24T16:30:49.312Z [out] > node ./build.js
2020-08-24T16:30:49.312Z [out]
2020-08-24T16:30:52.039Z [err] gyp ERR! 2020-08-24T16:30:52.042Z [err] build error
2020-08-24T16:30:52.042Z [err] gyp
2020-08-24T16:30:52.044Z [err] ERR! stack Error: not found: make
2020-08-24T16:30:52.044Z [err] gyp ERR! stack
2020-08-24T16:30:52.045Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2020-08-24T16:30:52.045Z [err] gyp ERR! stack
at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2020-08-24T16:30:52.045Z [err] gyp ERR! stack
at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2020-08-24T16:30:52.045Z [err] gyp ERR! stack
at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2020-08-24T16:30:52.045Z [err] gyp ERR! stack
at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2020-08-24T16:30:52.045Z [err] gyp ERR! stack
at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2020-08-24T16:30:52.045Z [err] gyp ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
2020-08-24T16:30:52.047Z [err] gyp ERR! System Linux 5.4.0-1015-raspi
2020-08-24T16:30:52.047Z [err] gyp ERR! 2020-08-24T16:30:52.047Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2020-08-24T16:30:52.047Z [err] gyp ERR! cwd /home/mikeallgood/.node-red/node_modules/deasync
2020-08-24T16:30:52.047Z [err] gyp ERR! node -v
2020-08-24T16:30:52.048Z [err] v12.18.3
2020-08-24T16:30:52.048Z [err] gyp ERR! node-gyp -v v5.1.0
2020-08-24T16:30:52.048Z [err] gyp ERR! not ok
2020-08-24T16:30:52.065Z [err] Build failed
2020-08-24T16:30:53.421Z [err] npm
2020-08-24T16:30:53.422Z [err] WARN node-red-project@0.0.1 No repository field. 2020-08-24T16:30:53.464Z [err] npm
2020-08-24T16:30:53.464Z [err] WARN node-red-project@0.0.1 No license field.
2020-08-24T16:30:53.465Z [err]
2020-08-24T16:30:53.533Z [err] npm
2020-08-24T16:30:53.533Z [err] ERR! code ELIFECYCLE
2020-08-24T16:30:53.533Z [err] npm ERR! errno 1
2020-08-24T16:30:53.543Z [err] npm
2020-08-24T16:30:53.543Z [err] ERR! deasync@0.1.20 install: `node ./build.js`
2020-08-24T16:30:53.543Z [err] npm ERR! Exit status 1
2020-08-24T16:30:53.543Z [err] npm ERR!
2020-08-24T16:30:53.543Z [err] npm ERR! Failed at the deasync@0.1.20 install script.
2020-08-24T16:30:53.543Z [err] npm
2020-08-24T16:30:53.544Z [err] ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-08-24T16:30:53.580Z [err]
2020-08-24T16:30:53.581Z [err] npm ERR! A complete log of this run can be found in:
2020-08-24T16:30:53.581Z [err] npm ERR!
2020-08-24T16:30:53.581Z [err] /home/mikeallgood/.npm/_logs/2020-08-24T16_30_53_549Z-debug.log
2020-08-24T16:30:53.638Z rc=1
Looks like you are missing the basic build tools (e.g. make) required to build the native components of the npmjs modules you are trying to install.
You probably need to run the following:
sudo apt-get install build-essential