Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsfeat module is not defined #172

Open
Omi0 opened this issue Mar 26, 2019 · 5 comments
Open

jsfeat module is not defined #172

Omi0 opened this issue Mar 26, 2019 · 5 comments

Comments

@Omi0
Copy link

Omi0 commented Mar 26, 2019

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?

@timbenniks
Copy link

timbenniks commented Apr 1, 2019

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

@flut1
Copy link

flut1 commented May 8, 2019

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/,
}

@celestius0
Copy link

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

@ibuioli
Copy link

ibuioli commented Sep 26, 2019

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;

@milcktoast
Copy link
Contributor

Any plans to fix how the module exports are defined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants