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

Solved installing on Windows #847

Open
opencv4nodejs opened this issue Apr 24, 2022 · 4 comments
Open

Solved installing on Windows #847

opencv4nodejs opened this issue Apr 24, 2022 · 4 comments

Comments

@opencv4nodejs
Copy link

opencv4nodejs commented Apr 24, 2022

I could not install opencv4nodejs on Windows 11 with node 16, npm 8, and Visual Studio 2019 build tools.

I downgraded to node 14 and npm 6.

I had Visual Studio 2017 build tools installed with 2019, but the installation looked from 15.0 in the 2019 folder.

I uninstalled 2019 tools, repaired 2017 from the VS Installer, and successfully installed openvs4nodejs from Developer Command Prompt for VS 2017.

I found this #717 alternative to uninstalling 2019.

info install failed to find auto-build.json: C:\Users\skele\Documents\apps\voice\socket\node_modules\opencv-build\opencv\auto-build.json
info install
info install running install script...
info install
info install opencv version: 3.4.6
info install with opencv contrib: yes
info install custom build flags:
info install
info install executing: git --version
info install git --version: git version 2.36.0.windows.1
info install
info install executing: cmake --version
info install cmake --version: cmake version 3.12.18081601-MSVC_2
info install
info install CMake suite maintained and supported by Kitware (kitware.com/cmake).
info install
info install using msbuild: {
info install   path: 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe',
info install   version: 15
info install }

npm ERR! opencv-build@0.1.9 install: `node ./install.js`
@UrielCh
Copy link
Contributor

UrielCh commented Apr 24, 2022

please try using @u4/opencv4nodejs this version will be merged to opencv4nodejs soon.
but for that, we need more feedback.

@Jaid
Copy link

Jaid commented Jun 20, 2022

@UrielCh, thank you very much for working on your fork. Using @u4/opencv4nodejs and @u4/opencv-build solved all my setup problems on Windows.

@UrielCh
Copy link
Contributor

UrielCh commented Aug 30, 2022

Hi,
Great news for those people that do not want to build their OpenCV:
I published @u4/opencv4nodejs V 6.2.4 today,

This version autodetects the common setup path for Brew on Mac, Chocolatey on Windows, and Apt on Linux.

  • Windows:

choco install opencv

  • Mac:

brew install opencv

  • debian:

apt -y install libopencv-contrib-dev libopencv-dev

just define environment variable: OPENCV4NODEJS_DISABLE_AUTOBUILD=1

And your prebuild OpenCV will be used.

You may need to call:
npx build-opencv rebuild
or
npx build-opencv --nobuild rebuild (if you do not define OPENCV4NODEJS_DISABLE_AUTOBUILD variable)

@robtoll
Copy link

robtoll commented Mar 3, 2023

thanks this helped a lot

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

4 participants