Error when installing opencv4nodejs
DitJee opened this issue · 1 comments
My installation process
- npm init
- npm install windows-build-tools --vs2015
- npm install -g node-gyp
- npm install --prefer-offline --vs2015 --save opencv4nodejs
Error Message
FinalizeBuildStatus:
Deleting file "x64\Release\INSTALL\INSTALL.tlog\unsuccessfulbuild".
Touching "x64\Release\INSTALL\INSTALL.tlog\INSTALL.lastbuildstate".
Done Building Project "C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\buil
d\INSTALL.vcxproj" (default targets).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:06.81
info install writing auto-build file into directory: C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\auto-build.json
info install { opencvVersion: '3.4.6',
info install autoBuildFlags: '',
info install modules:
info install [ { opencvModule: 'core',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_core346.lib' },
info install { opencvModule: 'highgui',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_highgui346.lib' },
info install { opencvModule: 'imgcodecs',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_imgcodecs346.lib' },
info install { opencvModule: 'imgproc',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_imgproc346.lib' },
info install { opencvModule: 'features2d',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_features2d346.lib' },
info install { opencvModule: 'calib3d',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_calib3d346.lib' },
info install { opencvModule: 'photo',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_photo346.lib' },
info install { opencvModule: 'objdetect',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_objdetect346.lib' },
info install { opencvModule: 'ml',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_ml346.lib' },
info install { opencvModule: 'video',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_video346.lib' },
info install { opencvModule: 'videoio',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_videoio346.lib' },
info install { opencvModule: 'videostab',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_videostab346.lib' },
info install { opencvModule: 'dnn',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_dnn346.lib' },
info install { opencvModule: 'face',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_face346.lib' },
info install { opencvModule: 'text',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_text346.lib' },
info install { opencvModule: 'tracking',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_tracking346.lib' },
info install { opencvModule: 'xfeatures2d',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_xfeatures2d346.lib' },
info install { opencvModule: 'ximgproc',
info install libPath: 'C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_ximgproc346.lib' } ] }
opencv4nodejs@5.6.0 install C:\Fling\Warehouse\scripts\js_version\node_modules\opencv4nodejs
node ./install/install.js
info install using lib dir: C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release
info install found the following libs:
info install core : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_core346.lib
info install highgui : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_highgui346.lib
info install imgcodecs : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_imgcodecs346.lib
info install imgproc : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_imgproc346.lib
info install features2d : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_features2d346.lib
info install calib3d : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_calib3d346.lib
info install photo : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_photo346.lib
info install objdetect : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_objdetect346.lib
info install ml : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_ml346.lib
info install video : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_video346.lib
info install videoio : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_videoio346.lib
info install videostab : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_videostab346.lib
info install dnn : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_dnn346.lib
info install face : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_face346.lib
info install text : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_text346.lib
info install tracking : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_tracking346.lib
info install xfeatures2d : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_xfeatures2d346.lib
info install ximgproc : C:\Fling\Warehouse\scripts\js_version\node_modules\opencv-build\opencv\build\lib\Release\opencv_ximgproc346.lib
info install setting the following defines:
info defines OPENCV4NODEJS_FOUND_LIBRARY_CORE
info defines OPENCV4NODEJS_FOUND_LIBRARY_HIGHGUI
info defines OPENCV4NODEJS_FOUND_LIBRARY_IMGCODECS
info defines OPENCV4NODEJS_FOUND_LIBRARY_IMGPROC
info defines OPENCV4NODEJS_FOUND_LIBRARY_FEATURES2D
info defines OPENCV4NODEJS_FOUND_LIBRARY_CALIB3D
info defines OPENCV4NODEJS_FOUND_LIBRARY_PHOTO
info defines OPENCV4NODEJS_FOUND_LIBRARY_OBJDETECT
info defines OPENCV4NODEJS_FOUND_LIBRARY_ML
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEO
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEOIO
info defines OPENCV4NODEJS_FOUND_LIBRARY_VIDEOSTAB
info defines OPENCV4NODEJS_FOUND_LIBRARY_DNN
info defines OPENCV4NODEJS_FOUND_LIBRARY_FACE
info defines OPENCV4NODEJS_FOUND_LIBRARY_TEXT
info defines OPENCV4NODEJS_FOUND_LIBRARY_TRACKING
info defines OPENCV4NODEJS_FOUND_LIBRARY_XFEATURES2D
info defines OPENCV4NODEJS_FOUND_LIBRARY_XIMGPROC
info install setting the following includes:
info includes C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/include
info includes C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/include/opencv4
info install setting the following libs:
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_core346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_highgui346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_imgcodecs346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_imgproc346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_features2d346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_calib3d346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_photo346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_objdetect346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_ml346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_video346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_videoio346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_videostab346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_dnn346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_face346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_text346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_tracking346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_xfeatures2d346.lib
info libs C:/Fling/Warehouse/scripts/js_version/node_modules/opencv-build/opencv/build/lib/Release/opencv_ximgproc346.lib
info install spawning node gyp process: node-gyp rebuild --jobs max
C:\Fling\Warehouse\scripts\js_version\node_modules\opencv4nodejs>if not defined npm_config_node_gyp (node "C:\node\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild --jobs max ) else (node "C:\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --jobs max )
C:\Fling\Warehouse\scripts\js_version\node_modules\opencv4nodejs\build\opencv4nodejs.vcxproj(20,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\node\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "C:\node\node.exe" "C:\node\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--jobs" "max"
gyp ERR! cwd C:\Fling\Warehouse\scripts\js_version\node_modules\opencv4nodejs
gyp ERR! node -v v8.12.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
OpenCV version (example 3.4.1): 5.6.0
With OpenCV-contrib? (extra modules): no
OS: Windows 10
solved by changing from powershell to cmd. Kinda weird solution, right?