clmtrackr icon indicating copy to clipboard operation
clmtrackr copied to clipboard

jsfeat module is not defined

Open Omi0 opened this issue 6 years ago • 5 comments

While loading your example I am seeing following error in console: Uncaught ReferenceError: module is not defined Referencing to jsfeat module. Do you experience the same issue?

Omi0 avatar Mar 26 '19 11:03 Omi0

I have this issue when loading clmtrackr through webpack. This error shows when the start() function is called.

timbenniks avatar Apr 01 '19 18:04 timbenniks

In webpack as a workaround you may want to try loading clmtrackr as an UMD module. Instead of importing from clmtrackr, import from clmtrackr/build/clmtrackr. Also add to your webpack config:

module: {
  noParse: /build\/clmtrackr/,
}

flut1 avatar May 08 '19 11:05 flut1

This is an issue when trying to load clmtrackr in Angular(8) as well. Any suggestions?

celestius0 avatar Jul 29 '19 17:07 celestius0

This is an issue when trying to load clmtrackr in Angular(8) as well. Any suggestions?

Yes, that is an error from Angular 7+. I made an implementation, but for solve this specific error you need edit the angular.json file and add the module like "commonJS" like this:

"scripts": [ "node_modules/clmtrackr/build/clmtrackr.js" ]

And then you load it in a TS file (like a component) like this:

declare var clm: any;

ibuioli avatar Sep 26 '19 19:09 ibuioli

Any plans to fix how the module exports are defined?

milcktoast avatar May 01 '20 01:05 milcktoast