danfojs icon indicating copy to clipboard operation
danfojs copied to clipboard

Problem in installation

Open barakadax opened this issue 1 year ago • 2 comments

When I try to install:

npm install danfojs-node  

it's giving me back:

npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup   [
npm WARN cleanup     'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\myPc\e2eTests\node_modules\danfojs-node\node_modules\@tensorflow\tfjs-backend-webgl\dist'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-backend-webgl\\dist'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\myPc\\e2eTests\\node_modules\\danfojs-node',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\myPc\e2eTests\node_modules\danfojs-node\node_modules\@tensorflow\tfjs-converter'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-converter'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-node',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\myPc\e2eTests\node_modules\danfojs-node\node_modules\@tensorflow\tfjs-node\deps\include\tensorflow'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-node\\deps\\include\\tensorflow'
npm WARN cleanup     }
npm WARN cleanup   ],
npm WARN cleanup   [
npm WARN cleanup     'C:\\myPc\\e2eTests\\node_modules\\danfojs-node',
npm WARN cleanup     [Error: EPERM: operation not permitted, rmdir 'C:\myPc\e2eTests\node_modules\danfojs-node\node_modules\@tensorflow\tfjs-node\deps\include\tensorflow'] {
npm WARN cleanup       errno: -4048,
npm WARN cleanup       code: 'EPERM',
npm WARN cleanup       syscall: 'rmdir',
npm WARN cleanup       path: 'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-node\\deps\\include\\tensorflow'
npm WARN cleanup     }
npm WARN cleanup   ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\myPc\e2eTests\node_modules\danfojs-node\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:\myPc\e2eTests\node_modules\danfojs-node\node_modules\@tensorflow\tfjs-node\deps\lib\tensorflow.dll' -> 'C:\myPc\e2eTests\node_modules\danfojs-node\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:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-node\\deps\\lib\\tensorflow.dll',
npm ERR!   dest: 'C:\\myPc\\e2eTests\\node_modules\\danfojs-node\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v9\\tensorflow.dll'
npm ERR! }
npm ERR!
npm ERR! Node.js v21.6.2
npm ERR!
npm ERR!     at genericNodeError (node:internal/errors:984:15)
npm ERR!     at wrappedFn (node:internal/errors:538:14)
npm ERR!     at ChildProcess.exithandler (node:child_process:422:12)
npm ERR!     at ChildProcess.emit (node:events:519: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\MyUser\AppData\Local\npm-cache\_logs\2024-03-07T14_52_03_783Z-debug-0.log

Expected behavior Clean installation

Desktop (please complete the following information): NodeJS version 21.6.2 in win11

barakadax avatar Mar 07 '24 14:03 barakadax

Hey, I had the same issue. Based on https://github.com/tensorflow/tfjs/issues/7793, installing node v.18.16.1 should work. I downloaded it from there https://nodejs.org/download/release/v18.16.1/ and installed it, now the installation is working.

Hope this helps :)

JohannesSchwegler avatar Mar 20 '24 11:03 JohannesSchwegler

Thanks for your answer, for private projects this is helpful but on company solution I will get blocked in CI/CD because it will build on latest and will duplicate the issue, it will work only locally :(

barakadax avatar Mar 20 '24 11:03 barakadax