tensorflow 引用 node 版本的错误解决办法
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.
解决办法,
进入问题目录 cd /Users/bachi/gitlab/ding-server/node_modules/_@[email protected]@@tensorflow/tfjs-node/lib
这里只有 /napi-v5,复制一个目录到 /napi-v3 即可