captcha-com / angular-captcha

BotDetect CAPTCHA: Angular Captcha Module (TypeScript: Angular 2/4/5/6/7/8+).
https://captcha.com/angular-captcha.html
16 stars 10 forks source link

Can't resolve all parameters for CaptchaService: (?, ?, ?) #1

Closed Alavi1412 closed 6 years ago

Alavi1412 commented 6 years ago

I have followed the steps in npm for setting up this package but after adding this code:

BotDetectCaptchaModule.forRoot({
      captchaEndpoint: '/botdetect-java-captcha-api-path-at-server-side/botdetectcaptcha'
    })

to my appModule, the app log the following error in console:

compiler.js:466 Uncaught Error: Can't resolve all parameters for CaptchaService: (?, ?, ?).
    at syntaxError (compiler.js:466)
    at CompileMetadataResolver._getDependenciesMetadata (compiler.js:15547)
    at CompileMetadataResolver._getTypeMetadata (compiler.js:15382)
    at CompileMetadataResolver._getInjectableMetadata (compiler.js:15362)
    at CompileMetadataResolver.getProviderMetadata (compiler.js:15722)
    at eval (compiler.js:15633)
    at Array.forEach (<anonymous>)
    at CompileMetadataResolver._getProvidersMetadata (compiler.js:15593)
    at eval (compiler.js:15595)
    at Array.forEach (<anonymous>)

I don't use systemJS so I skip the systemJS step in npm

botdetect-support commented 6 years ago

The issue is fixed in the latest version of the module. Run the following command to get the latest version: npm i angular-captcha@latest Thanks for your report. If you have any further questions, please feel free to contact us again through contact form on captcha.com.