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 引用 node 版本的错误解决办法 #22

Open
jayli opened this issue Nov 20, 2020 · 0 comments
Open

tensorflow 引用 node 版本的错误解决办法 #22

jayli opened this issue Nov 20, 2020 · 0 comments

Comments

@jayli
Copy link
Owner

jayli commented Nov 20, 2020

tensorflow 引用 node 版本的错误

node-pre-gyp info This Node instance does not support builds for N-API version 4
node-pre-gyp info This Node instance does not support builds for N-API version 5
node-pre-gyp info This Node instance does not support builds for N-API version 6
node-pre-gyp info This Node instance does not support builds for N-API version 4
node-pre-gyp info This Node instance does not support builds for N-API version 5
node-pre-gyp info This Node instance does not support builds for N-API version 6
/Users/bachi/gitlab/ding-server/node_modules/_@[email protected]@@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: /Users/bachi/gitlab/ding-server/node_modules/@[email protected]@@tensorflow/tfjs-node/lib/napi-v3/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. (/Users/bachi/gitlab/ding-server/node_modules/
@[email protected]@@tensorflow/tfjs-node/dist/index.js:49:11)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (/Users/bachi/gitlab/ding-server/brain/brain.js:5:1)
at Module._compile (internal/modules/cjs/loader.js:701:30)

解决办法,

进入问题目录 cd /Users/bachi/gitlab/ding-server/node_modules/_@[email protected]@@tensorflow/tfjs-node/lib

这里只有 /napi-v5,复制一个目录到 /napi-v3 即可

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

No branches or pull requests

1 participant