Reputation: 31
> [email protected] install C:\projects\opencvtry\node_modules\opencv-build > node ./install.js info install if you want to use an own OpenCV installation set OPENCV4NODEJS_DISABLE_AUTOBUILD info install library dir does not exist: C:\projects\opencvtry\node_modules\opencv-build\opencv\build\lib\Release info install running install script... ERR! Error: Command failed: cmake --version 'cmake' is not recognized as an internal or external command, operable program or batch file. npm WARN [email protected] No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] install: `node ./install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Upvotes: 3
Views: 15241
Reputation: 2809
You need of 'cmake' in your Operative System, es. in Debian/Ubuntu
sudo apt install -y cmake
Upvotes: 6
Reputation: 871
Open your terminal.
Step 1 install brew // skip this step if your machine has brew installed.
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
Step 2 install cMake
brew install cmake
You can check if cmake installed by
cmake --version
Upvotes: 9
Reputation: 140
to solve that issue, please download the Cmake installer by following the link:
Preferably I would suggest downloading the msi installer if you are windows, and select that it sets the system environment variable for you.
Awesome, that should fix that error.
but if you decide to set the environment variable manually, here is the docs https://stellar-group.github.io/hpx/docs/html/hpx/manual/build_system/cmake_basics.html
Upvotes: 5
Reputation: 329
I would say you don't have cmake installed or is not in your path:
'cmake' is not recognized as an internal or external command
execute "cmake" before "npm install --save opencv4nodejs" and if the command is not found then you catched it.
Upvotes: 0