kazuhitoyokoi / node-red-contrib-tensorflow

Apache License 2.0
23 stars 7 forks source link

Node-red-contrib-tensorflow 0.3.1 update failed #13

Closed FireWizard52 closed 1 year ago

FireWizard52 commented 2 years ago

I tried to update Tensorflow node from version 0.2.2 to 0.3.1 Unfortunately it failed with the following error messages:

2022-11-30T15:39:17.678Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-tensorflow@0.3.1
2022-11-30T15:39:18.353Z [err] npm
2022-11-30T15:39:18.354Z [err]  
2022-11-30T15:39:18.354Z [err] WARN config production Use `--omit=dev` instead.
2022-11-30T15:39:53.829Z [err] npm
2022-11-30T15:39:53.829Z [err]  
2022-11-30T15:39:53.829Z [err] ERR! code 1
2022-11-30T15:39:53.830Z [err] npm
2022-11-30T15:39:53.830Z [err]  ERR!
2022-11-30T15:39:53.830Z [err]  path
2022-11-30T15:39:53.830Z [err]  /var/db/nodered/node_modules/@tensorflow/tfjs-node
2022-11-30T15:39:53.833Z [err] npm
2022-11-30T15:39:53.833Z [err]  ERR! command failed
2022-11-30T15:39:53.833Z [err] npm
2022-11-30T15:39:53.833Z [err]  ERR! 
2022-11-30T15:39:53.833Z [err] command sh /tmp/install-a28218cb.sh
2022-11-30T15:39:53.833Z [err] npm
2022-11-30T15:39:53.833Z [err]  ERR! /var/db/nodered/node_modules/@tensorflow/tfjs-node/scripts/deps-constants.js:86
2022-11-30T15:39:53.833Z [err] npm 
2022-11-30T15:39:53.833Z [err] ERR!   throw Exception('Unsupported platform: ' + os.platform());
2022-11-30T15:39:53.833Z [err] npm ERR!   ^
2022-11-30T15:39:53.833Z [err] npm ERR!
2022-11-30T15:39:53.834Z [err]  
2022-11-30T15:39:53.834Z [err] npm ERR!
2022-11-30T15:39:53.834Z [err]  ReferenceError: Exception is not defined
2022-11-30T15:39:53.834Z [err] npm ERR!
2022-11-30T15:39:53.834Z [err]      at Object.<anonymous> (/var/db/nodered/node_modules/@tensorflow/tfjs-node/scripts/deps-constants.js:86:3)
2022-11-30T15:39:53.834Z [err] npm ERR!
2022-11-30T15:39:53.834Z [err]      at Module._compile (node:internal/modules/cjs/loader:1109:14)
2022-11-30T15:39:53.834Z [err] npm ERR!
2022-11-30T15:39:53.834Z [err]      at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
2022-11-30T15:39:53.834Z [err] npm ERR!
2022-11-30T15:39:53.834Z [err]      at Module.load (node:internal/modules/cjs/loader:989:32)
2022-11-30T15:39:53.834Z [err] npm 
2022-11-30T15:39:53.834Z [err] ERR!     at Function.Module._load (node:internal/modules/cjs/loader:829:14)
2022-11-30T15:39:53.834Z [err] npm 
2022-11-30T15:39:53.834Z [err] ERR!     at Module.require (node:internal/modules/cjs/loader:1013:19)
2022-11-30T15:39:53.834Z [err] npm 
2022-11-30T15:39:53.834Z [err] ERR!     at require (node:internal/modules/cjs/helpers:93:18)
2022-11-30T15:39:53.834Z [err] npm 
2022-11-30T15:39:53.834Z [err] ERR!     at Object.<anonymous> (/var/db/nodered/node_modules/@tensorflow/tfjs-node/scripts/install.js:36:5)
2022-11-30T15:39:53.834Z [err] npm 
2022-11-30T15:39:53.834Z [err] ERR!     at Module._compile (node:internal/modules/cjs/loader:1109:14)
2022-11-30T15:39:53.834Z [err] npm 
2022-11-30T15:39:53.834Z [err] ERR!     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
2022-11-30T15:39:53.837Z [err] 
2022-11-30T15:39:53.838Z [err] npm ERR!
2022-11-30T15:39:53.838Z [err]  A complete log of this run can be found in:
2022-11-30T15:39:53.838Z [err] npm ERR!     /var/db/nodered/.npm/_logs/2022-11-30T15_39_18_297Z-debug-0.log
2022-11-30T15:39:53.893Z rc=1

The line that took my special attention was:

2022-11-30T15:39:53.833Z [err] ERR! throw Exception('Unsupported platform: ' + os.platform());

where "Unsupported platform" was in red.

This could very well be the case, as I tried to run it in a TrueNAS (FreeBSD) jail on a HP Micro Gen 8 server. Anyone can confirm that version 0.2.2. is the latest that should run on FreeBSD platform? Any hint to solve it, is also welcome.

kazuhitoyokoi commented 1 year ago

From 0.2.2 to 0.3.1, I updated the TensorFlow.js module to the latest version. Therefore, I think the latest version of TensorFlow.js doesn't support the FreeBSD platform. Please use version 0.2.2.