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
Error: Cannot find module '.../node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node' #2046
Comments
Workaround: |
@haoyangnz what's the operating system you are using? |
@kangyizhang macos mojave 10.14.6 |
|
@kangyizhang hi there, I got the same issue here.
|
hi @imnaifu can you provide what's the operating system you are using? can you successfully run the official tfjs-node example? |
Hey @kangyizhang, it looks like I'm having the same issues. Node Extra contextI'm using tfjs in a Vue.js / Electron app. I just factory restored my machine, on which everything was working before the reset. I also got this error on another MacBook ( Air ) which I had been using as a loner. I'm also getting I have verified I have xcode-cli tools installed. Default Are there any C/C++ dependencies I should check for? I also got some errors warning about what looked like C++ library deprecations dealing with NaN. But I can't reproduce those currently. Full error text
|
hi @eschirtz
|
Thanks! |
Wanted to drop in my
|
Same issue then run the example // Optional Load the binding: // Train a simple model: const xs = tf.randomNormal([100, 10]); model.fit(xs, ys, { and get this Error
|
hi @eschirtz can you do the following:
|
@Korochan17 which version of @tensorflow/tfjs-node are you using and what's your OS? |
@kangyizhang It appears to have worked! I'm going to mess around with it a little more, but I think removing the Thanks for your help :) |
@kangyizhang i m using tfjsnode v1.2.12 the latest version as i added it through |
hi @Korochan17
|
hi @kangyizhang when i installed it with
CPU-windows-1.2.11.zip
npm WARN saveError ENOENT: no such file or directory, open 'E:\AI\tensorflow\package.json'
there are maybe some problems with node-pre-gyp and gyp |
@Korochan17 can you install windows-build-tools (https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md#msbuildexe-exceptions) and try again? |
@kangyizhang
|
@Korochan17 it seems like the node.js kernel is trying to load the addon as Win32 application. Can you try to run |
@kangyizhang |
@koroman17 Tensorflow (include tf python, tf c, and tf javascript) is tested and supported for 64-bit systems. I didn't try but I don't think tensorflow python would work on 32-bit windows (tensorflow/tensorflow#20362). Feel free to comment if you have other question. |
I get the same error as stated in the subject.
where face-api-js itself also uses parts of @tensorflow, but not tfjs-node. face-api-js runs without any errors, the error appears only after I add tfjs-node. When I run the tfjs-node example
I tried What am I doing wrong? Any tips? here my complete yarn.lock file``` # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1"@tensorflow/tfjs-converter@1.5.2": "@tensorflow/tfjs-core@1.4.0": "@tensorflow/tfjs-core@1.5.2": "@tensorflow/tfjs-data@1.5.2": "@tensorflow/tfjs-layers@1.5.2": "@tensorflow/tfjs-node@^1.5.2": "@tensorflow/tfjs@1.5.2": "@types/node-fetch@^2.1.2": "@types/node@*": "@types/node@>6": "@types/node@^11.10.5": "@types/offscreencanvas@~2019.3.0": "@types/seedrandom@2.4.27": "@types/webgl-ext@0.0.30": "@types/webgl2@0.0.4": abbrev@1: adm-zip@^0.4.11: agent-base@^4.3.0: ansi-regex@^2.0.0: ansi-regex@^3.0.0: aproba@^1.0.3: are-we-there-yet@~1.1.2: balanced-match@^1.0.0: better-sqlite3@^5.4.0: brace-expansion@^1.1.7: canvas@^2.6.1: chownr@^1.1.1: code-point-at@^1.0.0: concat-map@0.0.1: console-control-strings@^1.0.0, console-control-strings@~1.1.0: core-util-is@~1.0.0: debug@^3.1.0, debug@^3.2.6: decompress-response@^4.2.0: deep-extend@^0.6.0: delegates@^1.0.0: detect-libc@^1.0.2: es6-promise@^4.0.3: es6-promisify@^5.0.0: face-api.js@^0.22.0: fs-minipass@^1.2.5: fs.realpath@^1.0.0: gauge@~2.7.3: glob@^7.1.3: google-protobuf@^3.9.2: has-unicode@^2.0.0: https-proxy-agent@^2.2.1: iconv-lite@^0.4.4: ignore-walk@^3.0.1: inflight@^1.0.4: inherits@2: inherits@~2.0.3: ini@~1.3.0: integer@^2.1.0: is-fullwidth-code-point@^1.0.0: is-fullwidth-code-point@^2.0.0: isarray@~1.0.0: mimic-response@^2.0.0: minimatch@^3.0.4: minimist@0.0.8: minimist@^1.2.0: minipass@^2.2.1, minipass@^2.3.5: minipass@^2.8.6: minizlib@^1.2.1: mkdirp@^0.5.0, mkdirp@^0.5.1: ms@^2.1.1: nan@^2.13.2, nan@^2.14.0: native-node-utils@^0.1.7: needle@^2.2.1: node-fetch@~2.1.2: node-pre-gyp@0.14.0: node-pre-gyp@^0.11.0: nopt@^4.0.1: npm-bundled@^1.0.1: npm-normalize-package-bin@^1.0.1: npm-packlist@^1.1.6: npmlog@^4.0.2, npmlog@^4.1.2: number-is-nan@^1.0.0: object-assign@^4.1.0: once@^1.3.0, once@^1.3.1: opencv-build@^0.1.3: opencv4nodejs@^4.9.1: os-homedir@^1.0.0: os-tmpdir@^1.0.0: osenv@^0.1.4: path-is-absolute@^1.0.0: process-nextick-args@~2.0.0: progress@^2.0.0: rc@^1.2.7: readable-stream@^2.0.6: rimraf@^2.6.1, rimraf@^2.6.2: safe-buffer@^5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: "safer-buffer@>= 2.1.2 < 3": sax@^1.2.4: seedrandom@2.4.3: semver@^5.3.0: set-blocking@~2.0.0: signal-exit@^3.0.0: simple-concat@^1.0.0: simple-get@^3.0.3: string-width@^1.0.1: "string-width@^1.0.2 || 2": string_decoder@~1.1.1: strip-ansi@^3.0.0, strip-ansi@^3.0.1: strip-ansi@^4.0.0: strip-json-comments@~2.0.1: tar@^4, tar@^4.4.2: tar@^4.4.6: tslib@^1.10.0: typeface-open-sans@^0.0.54: typeface-roboto-condensed@^0.0.54: typeface-ubuntu@^0.0.65: util-deprecate@~1.0.1: wide-align@^1.1.0: wrappy@1: yallist@^3.0.0, yallist@^3.0.3:
|
I am seeing the same error on Mac OS with version node: Here is the output of
And the output of
If I run
XCode is installed. When I run
This error still persists for Mac OS at least. Please reopen the issue. |
I am seeing an error with version 1.6.0
OS: Ubuntu 18.04.4 I discover a way to fix it. Then I edited package.json to |
I was facing this issue on WSL 2 using Ubuntu 18.04
|
throw err;
code: 'MODULE_NOT_FOUND', |
I still have the same issue. none of the above solutions worked for me. |
Hey @kangyizhang, I facing the same error while using @vladmandic/human. Note: I have already performed all the above steps you have mentioned so far. OS: Ubuntu 18.04.5 LTS Under lib folder there is one file: node/lib/napi-v8/tfjs_binding.node I also tried @nikilok steps to get rid of this error but didn't get any success. Also tried with Please do needful . |
After did so much trial and error and also debugging in the tfjs-node library I found that |
updating the node.js version solved the issue for me. |
for those who are still struggling with installing tfjs-node, you can use I currently have no issue with credit: https://stackoverflow.com/questions/55494344/i-cant-load-model-from-file-with-tensorflow-tfjs |
I found installing |
I encountered the same issue today, and here's how I resolved it. 1 delete the node_modules directory, hope this work to your project. |
To get help from the community, we encourage using Stack Overflow and the
tensorflow.js
tag.TensorFlow.js version
"@tensorflow/tfjs-core@1.2.9":
Browser version
Describe the problem or feature request
Error: Cannot find module '.../node_modules/@tensorflow/tfjs-node/lib/napi-v4/tfjs_binding.node'
The text was updated successfully, but these errors were encountered: