Cannot use in node.js
The documentation says it can be used in node.j but if I do:
import cv from '@techstark/opencv-js'
console.log(cv.getBuildInformation())
I get TypeError: cv.getBuildInformation is not a function
If I use cv.imread('file.jpg') I get ReferenceError: document is not defined
I tried using node:module createRequire and then require it but that yields the same issue.
I did see it works in CodeSandbox: https://codesandbox.io/p/devbox/angry-dust-0dzjip but I don't manage to do it it in WSL.
@fr-an-k check the tests in https://github.com/TechStark/opencv-js/tree/main/test, which run in node.js
How do I run the tests? They don't run with node and there is no documentation.
Yeah I'm also finding it doesn't work at all in node with the same error
I've added node.js example here https://github.com/TechStark/opencv-js-examples/tree/main/opencv-js-node-example