dceejay / tfjs-coco-ssd

Node-RED node for tensorflowjs coco ssd
Apache License 2.0
14 stars 10 forks source link

fixwindll.js searches for old napi version #15

Open bartbutenaers opened 3 years ago

bartbutenaers commented 3 years ago

Hi @dceejay,

I have tried to install this node on my Windows 10 portable, however the installtion fails both via the flow editor palette failed and via command line.

Your post installation script raises following error:

> node-red-contrib-tfjs-coco-ssd@0.5.7 postinstall c:\Users\Gebruiker\.node-red\node_modules\node-red-contrib-tfjs-coco-ssd
> node fixwindll.js

The lib dll doesn't exist.
The dep dll exists
internal/fs/utils.js:269
    throw err;
    ^

Error: ENOENT: no such file or directory, copyfile '../@tensorflow/tfjs-node/deps/lib/tensorflow.dll' -> '../@tensorflow/tfjs-node/lib/napi-v5/tensorflow.dll'
    at Object.copyFileSync (fs.js:1904:3)
    at Object.<anonymous> (c:\Users\Gebruiker\.node-red\node_modules\node-red-contrib-tfjs-coco-ssd\fixwindll.js:11:16)
    at Module._compile (internal/modules/cjs/loader.js:1015:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1035:10)
    at Module.load (internal/modules/cjs/loader.js:879:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -4058,
  syscall: 'copyfile',
  code: 'ENOENT',
  path: '../@tensorflow/tfjs-node/deps/lib/tensorflow.dll',
  dest: '../@tensorflow/tfjs-node/lib/napi-v5/tensorflow.dll'

Seems that your script searches for napi-v5, while on my filesystem there is only a napi-v7:

image

Would be very nice if you could fix this.

Thanks !!!!!!! Bart

dceejay commented 3 years ago

so yes - time moves on... versions change... but I see the dll is already there ? or did you move it manually ? (If it's now already in correct place I won't have to patch it...)

bartbutenaers commented 3 years ago

Yes Dave, indeed the tensorflow.dll file was already there. I have NOT moved anything manually. But as you can see it even fails when that file is already there...

dceejay commented 3 years ago

well all that is failing is me copying the file to the wrong place... as long as it's there then the library will work...

bartbutenaers commented 3 years ago

But when it fails I don't get your node in my pallette.

dceejay commented 3 years ago

ah ok