NCD IoT Edge Computer help

I had an issue with Dashboard not working and thought I bungled some package updates. I followed the reset procedure a few times now. After doing the firstboot -y, rebooting and running the setup script from a USB device, the system looks good except node-red-dashboard is not installed. I tried opkg update / upgrade onion-node-red which worked in installing node-red-dashboard and updating some other packages but if I try to go to the dashboard, I get the empty Welcome to the Node-RED Dashboard page instead of seeing the default flow’s ui, I lose connection to the server (in the node-red config interface) and node-red crashes/restarts.

I noticed npm complains about unmet peer dependencies (utf-8-validate and bufferutil) however if I attempt to install them make throws an error, “make: cc: Command not found”:

root@NCDGateway-0DAThis text will be hidden0:~/.node-red# node_install.sh utf-8-validate

> utf-8-validate@5.0.7 install /root/.node-red/node_modules/utf-8-validate
> node-gyp-build

make: Entering directory '/root/.node-red/node_modules/utf-8-validate/build'
  CC(target) Release/obj.target/validation/src/validation.o
make: cc: Command not found
make: *** [validation.target.mk:93: Release/obj.target/validation/src/validation.o] Error 127
make: Leaving directory '/root/.node-red/node_modules/utf-8-validate/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.81
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.node-red/node_modules/utf-8-validate
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! utf-8-validate@5.0.7 install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the utf-8-validate@5.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-12-29T00_46_44_114Z-debug.log
root@NCDGateway-0DA0:~/.node-red# node_install.sh cc
npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN ws@8.2.3 requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.

+ cc@3.0.1
added 35 packages in 112.044s
root@NCDGateway-0DA0:~/.node-red# node_install.sh utf-8-validate

> utf-8-validate@5.0.7 install /root/.node-red/node_modules/utf-8-validate
> node-gyp-build

make: Entering directory '/root/.node-red/node_modules/utf-8-validate/build'
  CC(target) Release/obj.target/validation/src/validation.o
make: cc: Command not found
make: *** [validation.target.mk:93: Release/obj.target/validation/src/validation.o] Error 127
make: Leaving directory '/root/.node-red/node_modules/utf-8-validate/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.14.81
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.node-red/node_modules/utf-8-validate
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN ws@8.2.3 requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! utf-8-validate@5.0.7 install: `node-gyp-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the utf-8-validate@5.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-12-29T00_52_41_758Z-debug.log

I was able to install the two dependencies by creating a symlink cc → gcc in /usr/bin however the main issue still remains. If I try to load the Dashboard, node-red crashes

Did you run this
opkg update

opkg upgrade onion-node-red

Thanks

Yes. As I said, running that installed node-red-dashboard but node-red still crashes if I try to open the dashboard.

@TravisE_NCD_Technica can you look into this

Hi,

Can you navigate to /root/.node-red/node_modules/node-red-dashboard and open the package.json file using vi and let me know what version it shows?

Also enter nodejs -v and let me know what version of that is running.

Hi Travis,
node-red-dashboard: 3.1.3
nodejs isn’t installed (node is at v8.10.0)

Hi,

We ship the IoT Edge Computer with node-red-dashboard version 2.27.0 installed. I have not tried a version after 3.0.0 so I am not sure if there would be compatibility issues. I would recommend rolling back to version 2.27.0 to see if that resolves the issue.

Hi Travis,
Thanks for that. I went and checked the dashboard project and found this: “These nodes require node.js version 12 or more recent. The last version to support node v8 was 2.30.0” so I rolled back to 2.30.0 and it’s working now.

I don’t remember where I saw it, but I thought I read something about not upgrading some of the packages on the Edge due to the limitations of the chipset but can’t find it now. Can you confirm what the latest version of node it will support?

Thanks,
Tony

The last line of nodered_setup.sh should definitely be updated to node -max_old_space_size=512 $(which npm) install node-red-dashboard@2.30.0 I had trouble with node-red crashing and dashboard not loading a factory reset. Had to roll node-red-dashboard back to 2.30.0

1 Like

pull request submitted:

@Bhaskar please accept the pull request when you have a chance.

the new update is live now…

1 Like