face-detection-node-opencv icon indicating copy to clipboard operation
face-detection-node-opencv copied to clipboard

npm installing opencv failed

Open RGDEV2022 opened this issue 8 years ago • 6 comments

Hi, I know this topic has been discussed everywhere but I cannot get anything to work and I really need some help.

Windows 10 npm 5.4.2

I am trying to get https://github.com/paulhayes/copterface to work for my Ar-Drone

Followed the steps npm install ar-drone npm install opencv

No luck what so ever, pre built binaries not found for [email protected] and a whole lot of other errors.

Is there a guide to make this work? I've read a hundred forums here and elsewhere regarding this but it's impossible to make work since the information on this topic is so scattered.

ERROR


[email protected] install C:\Users\User\AppData\Roaming\npm\node_modules\opencv node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Tried to download(403): https://node-opencv.s3.amazonaws.com/opencv/v6.0.0/Release/node-v48-win32-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for [email protected] and [email protected] (node-v48 ABI) (falling back to source compile with node-gyp) C:\Users\User\AppData\Roaming\npm\node_modules\opencv\utils\find-opencv.js:57 throw new Error("ERROR: couldn't read the lib directory " + err); ^

Error: ERROR: couldn't read the lib directory Error: ENOENT: no such file or directory, scandir 'C:\opencv\build\x64\vc14\lib' at C:\Users\User\AppData\Roaming\npm\node_modules\opencv\utils\find-opencv.js:57:23 at FSReqWrap.oncomplete (fs.js:123:15) gyp: Call to 'node utils/find-opencv.js --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Windows_NT 10.0.15063 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\Users\User\AppData\Roaming\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64\opencv.node" "--module_name=opencv" "--module_path=C:\Users\User\AppData\Roaming\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64" gyp ERR! cwd C:\Users\User\AppData\Roaming\npm\node_modules\opencv gyp ERR! node -v v6.10.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\User\AppData\Roaming\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64\opencv.node --module_name=opencv --module_path=C:\Users\User\AppData\Roaming\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64' (1) node-pre-gyp ERR! stack at ChildProcess. (C:\Users\User\AppData\Roaming\npm\node_modules\opencv\node_modules\node-pre-gyp\lib\util\compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:106:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:886:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) node-pre-gyp ERR! System Windows_NT 10.0.15063 node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\User\AppData\Roaming\npm\node_modules\opencv\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd C:\Users\User\AppData\Roaming\npm\node_modules\opencv node-pre-gyp ERR! node -v v6.10.3 node-pre-gyp ERR! node-pre-gyp -v v0.6.38 node-pre-gyp ERR! not ok Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\User\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\User\AppData\Roaming\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64\opencv.node --module_name=opencv --module_path=C:\Users\User\AppData\Roaming\npm\node_modules\opencv\build\opencv\v6.0.0\Release\node-v48-win32-x64' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\User\AppData\Roaming\npm-cache_logs\2017-10-06T15_46_47_034Z-debug.log


Any help would be greatly appreciated.

RGDEV2022 avatar Oct 06 '17 15:10 RGDEV2022

I have the same. What suggestions? Anyway will be doing research. I recently fixed OpenCV issue for CentOS (https://github.com/ageitgey/face_recognition/issues/191#issuecomment-350223266), and I will try to research this NodeJS issue - maybe it's the same issue, maybe I need to install Visual Studio.

PS. @rojig this ur issue seems to be duplicated of https://github.com/drejkim/face-detection-node-opencv/issues/12 - I would recommend delete/close ur issue.

alundiak avatar Dec 08 '17 14:12 alundiak

Is anyone here who fixed it? I got the same issue.

IAmVinnnn avatar May 14 '18 18:05 IAmVinnnn

Yes, there was a calibration issue. You need to press the C button to calibrate the sensors before flying.

On Mon, May 14, 2018 at 1:13 PM Vineet Chauhan [email protected] wrote:

Is anyone here who fixed it?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/drejkim/face-detection-node-opencv/issues/16#issuecomment-388912200, or mute the thread https://github.com/notifications/unsubscribe-auth/AJeI8rja-faa5foR8fslYscatVR4zszgks5tyclSgaJpZM4Pwq32 .

RGDEV2022 avatar May 14 '18 18:05 RGDEV2022

@rojig Dude, I don't understand what you want to say...

IAmVinnnn avatar May 15 '18 17:05 IAmVinnnn

Error: The specified module could not be found. opencv.node

Saruram avatar Jul 26 '18 10:07 Saruram

@Saruram If you get any solution please let me know also.

IAmVinnnn avatar Jul 26 '18 16:07 IAmVinnnn