Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@tensorflow\tfjs-node-gpu **module not be found** "@tensorflow\tfjs-node-gpu\lib\napi-v8\tfjs_binding.node" #8433

Closed
TryAngles opened this issue Nov 11, 2024 · 7 comments

Comments

@TryAngles
Copy link

TryAngles commented Nov 11, 2024

System information

  • Windows 11 64x
  • TensorFlow.js installed from (npm): npm i @tensorflow/tfjs-node-gpu
  • TensorFlow.js version: 4.22.0
  • CUDA/cuDNN version: 12.5

after proper installation,
i just imported @tensorflow/tfjs-node-gpu and executed. i got this Error:

node:internal/modules/cjs/loader:1586
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: The specified module could not be found.
\\?\C:\Users\letsm\OneDrive\Desktop\New folder\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v8\tfjs_binding.node
    at Module._extensions..node (node:internal/modules/cjs/loader:1586:18)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (C:\Users\letsm\OneDrive\Desktop\New folder\node_modules\@tensorflow\tfjs-node-gpu\dist\index.js:72:16)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12) {
  code: 'ERR_DLOPEN_FAILED'
}

Node.js v20.18.0 

i think one .dll file is missing

Other details:
node_modules@tensorflow\tfjs-node-gpu\package.json:-
package.json

main executed index.js file

const tf = require("@tensorflow/tfjs-node-gpu");
console.log(tf);

log file of npm i @tensorflow/tfjs-node-gpu:-
2024-11-11T15_06_43_414Z-debug-0.log

package.json file of project:-
package.json

@TryAngles TryAngles changed the title module not be found "@tensorflow\tfjs-node-gpu\lib\napi-v8\tfjs_binding.node" @tensorflow\tfjs-node-gpu **module not be found** "@tensorflow\tfjs-node-gpu\lib\napi-v8\tfjs_binding.node" Nov 11, 2024
@shmishra99 shmishra99 self-assigned this Nov 13, 2024
@shmishra99
Copy link
Contributor

Hi @TryAngles ,

I am able to run the following code on my Windows VM using Node.js v19.9.0.

const tf = require("@tensorflow/tfjs-node-gpu");
console.log(tf);
image

Since you're using Node.js v20.18.0 and experiencing issues, could you try downgrading to Node.js v19.9.0 and using Python 3.9.x?
Let me know if that resolves the problem. Thank You!!

@TryAngles
Copy link
Author

i tried this with node v19.9.0 but got same error:
image

so i reinstalled it by running npm install after deleting node_modules folder then i got a lot of error:
2024-11-17T06_10_56_164Z-debug-0.log

i don't know is this TensorFlow fault or my computer fault
what should i do?

@TryAngles
Copy link
Author

@tensorflow/tfjs-node-gpu is not installing so i tried to install @tensorflow/tfjs-node but i got another error:-
npm i @tensorflow/tfjs-node
2024-11-17T06_40_14_461Z-debug-0.log

then i tried install @tensorflow/tfjs then it is installed properly without any problem
Screenshot 2024-11-17 121922

then i run

const tf = require("@tensorflow/tfjs");
console.log(tf);

output:-
Screenshot 2024-11-17 122008

but,please fix this problem with @tensorflow/tfjs-node-gpu and @tensorflow/tfjs-node i want to use gpu for my project
And is there any fault related to my computer please tell.

@shmishra99
Copy link
Contributor

shmishra99 commented Nov 17, 2024

Hi @TryAngles ,

From your logs, I could see you are using a Python version that is not supported (3.13.0). Kindly install Python 3.9.x. Additionally, to use a GPU on your Windows device, you need to install the CUDA-supported dependencies.

Kindly follow the following documentation for CUDA-supported dependencies: URL

Thank You!!

Copy link

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Nov 25, 2024
Copy link

github-actions bot commented Dec 2, 2024

This issue was closed due to lack of activity after being marked stale for past 7 days.

@github-actions github-actions bot closed this as completed Dec 2, 2024
Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants