node-gyp configure --verbose "gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp"
See original GitHub issueI’m seeing the doc about windows troubleshooting because i have a unexpected error while i’m trying to use @tensorflow/tfjs-node module. That are my versions:
Python: 2.7.18 Node: 10.17.0 NPM: 7.1.2
When i call require(“@tensorflow/tfjs-node”) in any program, i got this error:
Error: The Node.js native addon module (tfjs_binding.node) can not be found at path: C:\Users\Marco\node_modules\@tensorflow\tfjs-node\lib\napi-v5\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.
I trying to rebuild the package and it’s all right:
npm rebuild @tensorflow/tfjs-node build-addon-from-source
rebuilt dependencies successfully
Then, I looked the doc and i go to node_modules/@tensorflow/tfjs-node and i run the command
node-gyp configure --verbose
but I see the error:
gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
What can I do in that case?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top GitHub Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
Same problem here: tfjs-node: 3.7.0 node.js: 14.16.0 npm: 6.14.11 electron: 12.0.14
No luck in WSL.
Also worth noting: It works fine when I’m serving the app in development mode. I only have issues when I package the application and install it.
I can’t upgrade to a higher version of node/npm because it will break electron. LTS (13.1.6) electron still uses node.js 14.6.0. Furthermore, node.js 14.6.0 uses Node-API v7.
I’ve done a lot of digging today. This binding.gyp error is the latest find. I read of other packages with a similar issue being resolved when developers downgraded from npm 7.x to 6.x. I tried both 6.x and 7.x here with no luck.