testdotai / appium-classifier-plugin

Apache License 2.0
259 stars 78 forks source link

install error: fatal error: '../node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h' file not found #44

Open superzoey opened 4 years ago

superzoey commented 4 years ago

sudo npm --registry http://registry.npm.taobao.org install test-ai-classifier --unsafe-perm

use command install with error like below:

CXX(target) Release/obj.target/test-ai-classifier/cc/main.o In file included from ../cc/main.cc:3: ../cc/detection.h:6:10: fatal error: '../node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h' file not found

include "../node_modules/@tensorflow/tfjs-node/deps/include/tensorflow/c/c_api.h"

^~~~~~~~~~~~~~~~~ 1 error generated. make: *** [Release/obj.target/test-ai-classifier/cc/main.o] Error 1 gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Darwin 18.7.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/appium/node_modules/test-ai-classifier gyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! test-ai-classifier@4.0.2 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the test-ai-classifier@4.0.2 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

vikasthange commented 3 years ago

Facing exactly same issue.

vikasthange commented 3 years ago

https://github.com/testdotai/appium-classifier-plugin/issues/33

abbassabeti commented 2 years ago

I had the exactly same issue. This resolved the issue for me:

npm install node-pre-gyp npm install --unsafe-perm --verbose node-sass npm install node-gyp --unsafe-perm=true npm install @tensorflow/tfjs-node npm install test-ai-classifier

reference: https://stackoverflow.com/a/65280741/9792460