UrielCh / opencv4nodejs

ESM Nodejs bindings to OpenCV 3/4
MIT License
254 stars 51 forks source link

Why cvloader.js remove the node suffix path name? #172

Closed ht-jo closed 1 month ago

ht-jo commented 1 month ago

Hello. I'm conflicted the problem of require path in cvloader.

I know the opencv4nodejs build result exist in build/Release/opencv4nodejs.node, and there was no problem in the past when 6 version.

I recently installed the latest version(7.1.2) of opencv4nodejs, there are so many good changes. But I don't know why this tries to find the build result of no suffix name(build/Release/opencv4nodejs). Of course, there should be a reason you have to add this code. Could you explain why it tries to import the file name of the no suffix .node?

Thank you.

ht-jo commented 1 month ago

There was what I misunderstood about commonjs setting in jest.config. I'm sorry!