face-detection-node-opencv
face-detection-node-opencv copied to clipboard
cant run
root@gansta-System-Product-Name:/home/gansta/Downloads/myface/js/face-detection-node-opencv/server# node server.js module.js:549 throw err; ^
Error: Cannot find module '/home/gansta/Downloads/myface/js/face-detection-node-opencv/server/node_modules/opencv/build/opencv/v6.0.0/Release/node-v57-linux-x64/opencv.node'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.
but other opencv-node apps worked
even am also facing same issue in windows 10 machine
im also see this error in window 10...
npm install
npm WARN deprecated [email protected]: Please use the native JSON object instead of JSON 3
npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command C:\Program Files\nodejs\node.exe C:\Users\shubh\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\shubh\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! > [email protected] install
npm ERR! > node-gyp rebuild
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm ERR! npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm ERR! npm WARN old lockfile
npm ERR! npm WARN old lockfile This is a one-time fix-up, please be patient...
npm ERR! npm WARN old lockfile
npm ERR! npm WARN deprecated [email protected]: this library is no longer supported
npm ERR! npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.7.11 found at "C:\Users\shubh\Anaconda3\python.exe"
npm ERR! gyp info find VS using VS2019 (16.7.30503.244) found at:
npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
npm ERR! gyp info find VS run with --verbose for detailed information
npm ERR! gyp info spawn C:\Users\shubh\Anaconda3\python.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args 'C:\Users\shubh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'msvs',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\shubh\AppData\Local\npm-cache\_cacache\tmp\git-clonenSL0GT\build\config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\shubh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args 'C:\Users\shubh\AppData\Local\node-gyp\Cache\16.14.0\include\node\common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=C:\Users\shubh\AppData\Local\node-gyp\Cache\16.14.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=C:\Users\shubh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\Users\\shubh\\AppData\\Local\\node-gyp\\Cache\\16.14.0\\<(target_arch)\\node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\Users\shubh\AppData\Local\npm-cache\_cacache\tmp\git-clonenSL0GT',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'C:\Users\shubh\AppData\Local\npm-cache\_cacache\tmp\git-clonenSL0GT\build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! C:\Users\shubh\AppData\Local\npm-cache_cacache\tmp\git-clonenSL0GT\utils\find-opencv.js:65
npm ERR! throw new Error("ERROR: couldn't read the lib directory " + err);
npm ERR! ^
npm ERR!
npm ERR! Error: ERROR: couldn't read the lib directory Error: ENOENT: no such file or directory, scandir 'C:\tools\opencv\build\lib'
npm ERR! at C:\Users\shubh\AppData\Local\npm-cache_cacache\tmp\git-clonenSL0GT\utils\find-opencv.js:65:23
npm ERR! at FSReqCallback.oncomplete (node:fs:188:23)
npm ERR! gyp: Call to 'node utils/find-opencv.js --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: gyp
failed with exit code: 1
npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Users\shubh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:261:16)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Windows_NT 10.0.18363
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\shubh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\shubh\AppData\Local\npm-cache_cacache\tmp\git-clonenSL0GT
npm ERR! gyp ERR! node -v v16.14.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path C:\Users\shubh\AppData\Local\npm-cache_cacache\tmp\git-clonenSL0GT
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
\git-clonenSL0GT AppData\Local\npm-cache_logs\2022-04-25T10_01_11_939Z-debug-0.log
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command C:\WINDOWS\an be found in:system32\cmd.exe /d /s /c node-gyp reocal\npm-cache_logs\2022-04-25T09_58_33_272Z-debug-0.logbuild
npm ERR! >
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! C:\Users\shubh\AppData\Local\npm-cache_logs\2022-04-25T10_01_11_939Z-debug-0.log
Please help.