Skip to content

Add NAPI-v9 support to tfjs-node-gpu package #8547

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gaikwadrahul8
Copy link
Contributor

Hi, Team
This PR adds NAPI-v9 support to the tfjs-node-gpu package.json configuration. I have added version 9 to the napi_versions array in tfjs-node-gpu/package.json and tested with Node.js v22.13.1 which uses NAPI-v9 verified that the package loads correctly after rebuilding with this change

Without this change a user with Node.js versions that use NAPI-v9 encounter an error when trying to load the package because the appropriate binary isn't available.

Here is error log :

Error: The specified module could not be found.
\\?\D:\Code\playground-ts-tensorflow\node_modules\.pnpm\@tensorflow+tfjs-node-gpu@4.22.0\node_modules\@tensorflow\tfjs-node-gpu\lib\napi-v8\tfjs_binding.node

It will fix this issue :#8542

I would request you to please review this PR, if you've any feedback or suggestion please let me know that will be very helpful. Thank you for your consideration.

@mattsoulanille
Copy link
Member

Thanks! Can you also update it in the tfjs-node-gpu package here please?

@gaikwadrahul8
Copy link
Contributor Author

gaikwadrahul8 commented Apr 18, 2025

Hi, @mattsoulanille
I have updated the tfjs-node-gpu package. Could you please confirm if you would also like me to update the tfjs-node package or if there's another action required? Thank you.

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

Successfully merging this pull request may close these issues.

2 participants