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

Cannot determine the module for class RecaptchaComponent #116

Closed
3 tasks
chessmaster42 opened this issue Jul 17, 2018 · 10 comments
Closed
3 tasks

Cannot determine the module for class RecaptchaComponent #116

chessmaster42 opened this issue Jul 17, 2018 · 10 comments

Comments

@chessmaster42
Copy link

Summary

I'm submitting a:

  • bug report
  • feature request
  • [x ] question / support request
  • other

Description

I am a getting the error on build of "Cannot determine the module for class RecaptchaComponent in ... Add RecaptchaComponent to the NgModule to fix it". This same error is mentioned over on #87 . I have both RecaptchaModule and RecaptchaFormsModule in the imports array of my feature module (not the root app module) and as such am importing RecaptchaModule as-is instead of as 'RecaptchaModule.forRoot()'.

Is there a problem with importing those modules into feature modules or is something else going on here?

Lib versions:

  • ng-recaptcha: 4.0.0-beta.1
  • Angular: 6.0.9
  • Typescript: 2.7.2
@FlacosFlace
Copy link

Any updates on this? Did you solve the problem? I have the same..

@chessmaster42
Copy link
Author

I haven't figured it out yet myself. Right now it's looking like I'm going to need to roll my own reCaptcha wrapper.

@FlacosFlace
Copy link

Did you already write your own wrapper?

@chessmaster42
Copy link
Author

Nope, ended up just giving up on this library and changed over to this one: https://www.npmjs.com/package/ngx-captcha

@FlacosFlace
Copy link

This one seems good. Thanks!

@crankedapps
Copy link

I am able to use ng-recaptcha on a normal Angular 6 app however I'm seeing this same issue when trying to import RecaptchaModule in a module that's within an Angular Library.

DethAriel added a commit that referenced this issue Oct 24, 2018
`forRoot` function is still available, but will be removed in a future major version

Fixes #113, #116
@DethAriel
Copy link
Owner

Hi, everybody! This should be fixed with version 4.1.0 now, sorry it took so long!

@segux
Copy link

segux commented Oct 25, 2018

Hi, everybody! This should be fixed with version 4.1.0 now, sorry it took so long!

Im on 4.2.1 and getting the same error. Did you sure is solved?

@vilbara
Copy link

vilbara commented Dec 12, 2018

Also getting this problem when compiling angular-cli library, using ng-recaptcha v4.1.0 and v4.2.1.

@vilbara
Copy link

vilbara commented Dec 13, 2018

This seems to be related how modules are structured in ng-recaptcha.

A workaround: Importing "RecaptchaCommonModule" in your application in addition to "RecaptchaModule" seem to solve the problem.

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