GithubHelp home page GithubHelp logo

Comments (15)

nooperpudd avatar nooperpudd commented on May 13, 2024 1

I don't think you have to install this package in Windows\System32, try another directory

from opencv4nodejs.

 avatar commented on May 13, 2024 1

if it is the final output of the installation, then let me know.
So I could close the issue.

thank you

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

Strange this looks like a node-gyp related issue. Do you have python 2.7 installed? Otherwise can you echo %VCTargetsPath% and make sure it points to MSBUILD vc14 (Visual Studio 2015 Compiler).

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

Lol, I just noticed the path, thanks @nooperpudd. You shouldn't install it in System32. If you want to install it globally you can npm install -g opencv4nodejs. Otherwise in the local folder of your project.

from opencv4nodejs.

 avatar commented on May 13, 2024

This is what I am getting when running that command->

Your environment has been set up for using Node.js 6.11.3 (x64) and npm.

C:\Users\advik>npm install -g opencv4nodejs

[email protected] install C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs
node-gyp rebuild

C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs\lib\utils.js:84
if (err) throw(err);
^

Error: ENOENT: no such file or directory, scandir 'C:\opencv3\build\x64\vc14\lib;C:\opencv3\build'
at Error (native)
gyp: Call to 'node ./lib/libs.js' 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:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:305: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:219:12)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "opencv4nodejs"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the opencv4nodejs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs opencv4nodejs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls opencv4nodejs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\advik\npm-debug.log

C:\Users\advik>

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

Okay this atleast has a proper error message. 'C:\opencv3\build\x64\vc14\lib;C:\opencv3\build' is not a proper path for your opencv lib folder. Can you check whether OPENCV_LIB_DIR and OPENCV_INCLUDE_DIR are pointing to valid directories with the .lib and .hpp files of opencv?

from opencv4nodejs.

 avatar commented on May 13, 2024

let me know which folder should be pointed by this variable...from build folder or from sources folder of opencv installation.

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

I assume 'C:\opencv3\build\x64\vc14\lib;' is the correct path for OPENCV_LIB_DIR? OPENCV_INCLUDE_DIR should be something like 'C:\opencv3\build\include' or 'C:\opencv3\build\install' then. Just look for the directory containing the opencv2 folder with all the header (.hpp) files.

from opencv4nodejs.

 avatar commented on May 13, 2024

C:\opencv3\build\x64\vc14\lib;
C:\opencv3\build;
C:\opencv3\sources\include\opencv2;
C:\opencv3\sources\include\opencv

I have included this files in variable OPENCV_LIB_DIR

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

OPENCV_LIB_DIR should be only 'C:\opencv3\build\x64\vc14\lib;'. OPENCV_INCLUDE_DIR should be 'C:\opencv3\sources\include' then I guess.

from opencv4nodejs.

 avatar commented on May 13, 2024

C:\opencv3;
C:\opencv3\build\include;
C:\opencv3\build\include\opencv2;
C:\opencv3\build\include\opencv;
C:\opencv3\sources\include\opencv2;
C:\opencv3\build\include

I have included this path in OPENCV_INCLUDE_DIR variable

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

Sorry, I do not really get what the issue is now. The environment variables OPENCV_LIB_DIR and OPENCV_INCLUDE_DIR point to a single directory each, not multiple. If you include multiple paths in the environment variable, it will fail to parse the path, when installing the module.

from opencv4nodejs.

 avatar commented on May 13, 2024

Is it the last outcome of "npm install -g opencv4nodejs" ->

 Creating library C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs\build\Release\opencv4nodejs.lib and

object C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs\build\Release\opencv4nodejs.exp
Generating code
c:\users\advik\appdata\roaming\npm\node_modules\opencv4nodejs\cc\modules\imgproc\contour.cc(159): warning C4700: uninit
ialized local variable 'parameter' used [C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs\build\opencv4nod
ejs.vcxproj]
Finished generating code
opencv4nodejs.vcxproj -> C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs\build\Release\opencv4nodejs.n
ode
opencv4nodejs.vcxproj -> C:\Users\advik\AppData\Roaming\npm\node_modules\opencv4nodejs\build\Release\opencv4nodejs.pd
b (Full PDB)

from opencv4nodejs.

justadudewhohacks avatar justadudewhohacks commented on May 13, 2024

Yes finished generating code means the build is done

from opencv4nodejs.

 avatar commented on May 13, 2024

thank you.

from opencv4nodejs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.