我之前添加了相同的问题并像这样修复它。
现在,当我尝试重现此 SO 帖子建议的步骤时,我无法再解决此问题。
我的配置是:
node -v v14.18.1
from my package.json
"@tensorflow-models/mobilenet": "^2.0.4",
"@tensorflow/tfjs": "^1.7.4",
"@tensorflow/tfjs-node": "^1.7.4",
当我按照之前的 SO 步骤运行以下命令时:
npm 重建 @tensorflow/tfjs-node --build-from-source
我得到:
> @tensorflow/tfjs-node@1.7.4 install /Users/cyrus/Documents/C_Personal projects/debord_slow_sender_meme/node_modules/@tensorflow/tfjs-node
> node scripts/install.js
CPU-darwin-1.7.4.tar.gz
* Building TensorFlow Node.js bindings
node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
clang: error: no such file or directory: 'projects/debord_slow_sender_meme/node_modules/@tensorflow/tfjs-node/deps/include'
make: *** [Release/obj.target/tfjs_binding/binding/tfjs_backend.o] Error 1
gyp ERR! build error
我的错误日志的详细屏幕截图: