'Cannot install opencv4nodejs using npm i -g opencv4nodejs on Mac OS 12.1 with Intel

ARN AppiumDoctor ➜ Why opencv4nodejs is needed and how to install it: https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/image-comparison.md

When I ran Appium doctor - I got the output above.

When I try to install - the error is: /usr/local/lib/node_modules/opencv4nodejs/install/install.js:37 npm ERR! throw new Error('library dir does not exist: ' + libDir) npm ERR! ^ npm ERR! npm ERR! Error: library dir does not exist: /usr/local/lib/node_modules/opencv4nodejs/node_modules/opencv-build/opencv/build/lib npm ERR! at Object. (/usr/local/lib/node_modules/opencv4nodejs/install/install.js:37:9) npm ERR! at Module._compile (node:internal/modules/cjs/loader:1097:14) npm ERR! at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10) npm ERR! at Module.load (node:internal/modules/cjs/loader:975:32) npm ERR! at Function.Module._load (node:internal/modules/cjs/loader:822:12) npm ERR! at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) npm ERR! at node:internal/main/run_main_module:17:47 npm ERR! npm ERR! Node.js v17.4.0

My node version is 17.4.0; I have tried switching to version 14 and that did not work. I have also uninstalled node an reinstalled - that did not work. The same was done for npm. How can I get this installed? Is it still needed to automate my tests on the simulator?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source