question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The Node.js native addon module (tfjs_binding.node) can not be found

See original GitHub issue

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version

1.7.4 / 2.0.1

Browser version

n/a

Describe the problem or feature request

When run mnist node: /tfjs-examples/mnist-node $ node main.js It throws exception.

Code to reproduce the bug / link to feature request

If you would like to get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

GitHub issues for this repository are tracked in the tfjs union repository.

Please file your issue there, following the guidance in that issue template. /tfjs-examples/mnist-node $ node main.js throws exception:

/mnt/d/Source/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-node/dist/index.js:49 throw new Error("The Node.js native addon module (tfjs_binding.node) can not " ^

Error: The Node.js native addon module (tfjs_binding.node) can not be found at path: /mnt/d/Source/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-node/lib/napi-v/tfjs_binding.node. Please run command ‘npm rebuild @tensorflow/tfjs-node build-addon-from-source’ to rebuild the native addon module. If you have problem with building the addon module, please check https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md or file an issue. at Object.<anonymous> (/mnt/d/Source/tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-node/dist/index.js:49:11) at Module._compile (module.js:652:30) at Object.Module._extensions…js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Module.require (module.js:596:17) at require (internal/module.js:11:18) at Object.<anonymous> (/mnt/d/Source/tfjs-examples/mnist-node/main.js:18:12) at Module._compile (module.js:652:30)

Not sure why it looks at tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-node/lib/napi-v/tfjs_binding.node, it should look at tfjs-examples/mnist-node/node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

6reactions
flo00008commented, Aug 9, 2020

Rebuild still didn’t solve my issue (on windows at least, I tried on ubuntu and works fine).

I’m unable to get it working and I get the same error as the other issues

5reactions
samiragolcommented, Sep 3, 2020

I was using a different node.js version that Electron was. so I installed node.js version is the same as the version of Electron is using (12.16.3) and that solved the problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Node.js native addon module (tfjs_binding.node) can not ...
On Ubuntu 20.04 I solved it with: sudo apt install build-essential; sudo npm i -g node-pre-gyp; npm rebuild @tensorflow/tfjs-node ...
Read more >
@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the ...
Read more >
tensorflow/tfjs-node - UNPKG
41, `The Node.js native addon module (tfjs_binding.node) can not ` +. 42, `be found at path: ` + String(bindingPath) + `. \nPlease run...
Read more >
VM (executing JavaScript) | Node.js v19.3.0 Documentation
The node:vm module enables compiling and running code within V8 Virtual Machine contexts. The node:vm module is not a security mechanism. Do not...
Read more >
Error: The Specified Module Could Not Be Found ... - ADocLib
\C:\Program Files\Nodejs\Tf\Node_Modules\@Tensorflow\Tfjs-Node\Lib ... Error: The Node.js native addon module tfjsbinding.node can not be found #4310.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found