I manage to show my dahua IP cam frames in an image-preview node.
Now I like to do object detection on every frame with yolo or tensorflow and coco nodes.
All nodes mentioning tensorflow or yolo that I found in the palette seem not possible to install.
I use node-red 3.1.7 and got the errors below :
Does someone have an idea why all nodes can not be installed without problems? Thx!
C:\Users\Wim\.node-red>npm i node-red-contrib-tfjs-coco-ssd
npm WARN deprecated npmlog@5.0.1: This package is no longer supported.
npm WARN deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm WARN deprecated gauge@3.0.2: This package is no longer supported.
npm ERR! code 1
npm ERR! path C:\Users\Wim\.node-red\node_modules\@tensorflow\tfjs-node
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/install.js
npm ERR! CPU-windows-3.21.1.zip
npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip
npm ERR! * Downloading libtensorflow
npm ERR!
npm ERR! * Building TensorFlow Node.js bindings
npm ERR! symlink ./lib/napi-v9 failed: Error: Command failed: node scripts/deps-stage.js symlink ./lib/napi-v9
npm ERR! * Symlink of lib\napi-v9\tensorflow.dll failed, creating a copy on disk.
npm ERR! node:internal/process/promises:289
npm ERR! triggerUncaughtException(err, true /* fromPromise */);
npm ERR! ^
npm ERR!
npm ERR! [Error: ENOENT: no such file or directory, copyfile 'C:\Users\Wim\.node-red\node_modules\@tensorflow\tfjs-node\deps\lib\tensorflow.dll' -> 'C:\Users\Wim\.node-red\node_modules\@tensorflow\tfjs-node\lib\napi-v9\tensorflow.dll'] {
npm ERR! errno: -4058,
npm ERR! code: 'ENOENT',
npm ERR! syscall: 'copyfile',
npm ERR! path: 'C:\\Users\\Wim\\.node-red\\node_modules\\@tensorflow\\tfjs-node\\deps\\lib\\tensorflow.dll',
npm ERR! dest: 'C:\\Users\\Wim\\.node-red\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v9\\tensorflow.dll'
npm ERR! }
npm ERR!
npm ERR! Node.js v20.11.1
npm ERR!
npm ERR! at ChildProcess.exithandler (node:child_process:422:12)
npm ERR! at ChildProcess.emit (node:events:518:28)
npm ERR! at maybeClose (node:internal/child_process:1105:16)
npm ERR! at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
npm ERR! code: 1,
npm ERR! killed: false,
npm ERR! signal: null,
npm ERR! cmd: 'node scripts/deps-stage.js symlink ./lib/napi-v9'
npm ERR! }
npm ERR! A complete log of this run can be found in: C:\Users\Wim\AppData\Local\npm-cache\_logs\2024-06-24T17_23_32_216Z-debug-0.log
searching this ↑ lead to this: Cant install on windows 11 · Issue #7793 · tensorflow/tfjs · GitHub which says it is a known issue & to use an earlier version of nodeJS. Note it does say use v19 or v18 but Node-RED is not tested against V19 (so if you intend on rolling back Node version, chose v18)
Lastly, this is not an issue on Linux. If you have a different computer running linux then that would be my first recommendation.
In the link @Steve-Mcl posted it is written "use Node.js v18.16.1" while you say you have v18.20.3 so next I would do is to get that node.js version and check if that helps