Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation issue #72

Closed
ghost opened this issue Nov 15, 2017 · 15 comments
Closed

installation issue #72

ghost opened this issue Nov 15, 2017 · 15 comments

Comments

@ghost
Copy link

ghost commented Nov 15, 2017

Hello there.
I am getting below issue while installing opencv4nodejs
I have installed node-gyp and windows-build-tools and I have set the env variables too.
the issue is->

C:\Windows\System32>npm install opencv4nodejs

opencv4nodejs@2.22.2 install C:\Windows\System32\node_modules\opencv4nodejs
node-gyp rebuild

C:\Windows\System32\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 )
gyp: binding.gyp not found (cwd: C:\Windows\System32\node_modules\opencv4nodejs) 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:\Windows\System32\node_modules\opencv4nodejs
gyp ERR! node -v v6.11.3
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\Windows\System32\package.json'
npm WARN System32 No description
npm WARN System32 No repository field.
npm WARN System32 No README data
npm WARN System32 No license field.
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" "opencv4nodejs"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! opencv4nodejs@2.22.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv4nodejs@2.22.2 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:\Windows\System32\npm-debug.log

C:\Windows\System32>

@justadudewhohacks
Copy link
Owner

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).

@nooperpudd
Copy link

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

@justadudewhohacks
Copy link
Owner

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.

@ghost
Copy link
Author

ghost commented Nov 15, 2017

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

opencv4nodejs@2.22.2 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! opencv4nodejs@2.22.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the opencv4nodejs@2.22.2 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>

@justadudewhohacks
Copy link
Owner

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?

@ghost
Copy link
Author

ghost commented Nov 15, 2017

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

@justadudewhohacks
Copy link
Owner

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.

@ghost
Copy link
Author

ghost commented Nov 15, 2017

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

@justadudewhohacks
Copy link
Owner

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

@ghost
Copy link
Author

ghost commented Nov 15, 2017

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

@justadudewhohacks
Copy link
Owner

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.

@ghost
Copy link
Author

ghost commented Nov 15, 2017

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)

  • opencv4nodejs@2.22.2
    added 3 packages in 211.857s

@ghost
Copy link
Author

ghost commented Nov 15, 2017

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

thank you

@justadudewhohacks
Copy link
Owner

Yes finished generating code means the build is done

@ghost
Copy link
Author

ghost commented Nov 16, 2017

thank you.

@ghost ghost closed this as completed Nov 16, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants