richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
219 stars 77 forks source link

Import NgxStripeModule.forRoot error #190

Closed thedarkknight197 closed 1 year ago

thedarkknight197 commented 1 year ago

Adding NgxStripeModule.forRoot("KEY"), in app.module produce:

node_modules/ngx-stripe/lib/directives/card-group.directive.d.ts:17:18 - error TS2314: Generic type 'ɵɵDirectiveDeclaration' requires 6 type argument(s).

17     static ɵdir: i0.ɵɵDirectiveDeclaration<StripeCardGroupDirective, "ngx-stripe-card-group,[ngxStripeCardGroup]", never, { "elementsOptions": "elementsOptions"; "stripe": "stripe"; }, { "elements": "elements"; }, never, never, false>;
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
richnologies commented 1 year ago

Hi @thedarkknight197,

Can you please tell me your Angular and ngx-stripe versions?

thedarkknight197 commented 1 year ago

Hello @richnologies the versions are: "ngx-stripe": "^14.1.0", "@angular/cli": "^12.2.17",

richnologies commented 1 year ago

Hello again @thedarkknight197,

You should use the same major for Angular and ngx-stripe. In your case use v12 for both.

https://ngx-stripe.dev/docs/installation#table-versions

Let me know if that works for you.

Kind regards

R

thedarkknight197 commented 1 year ago

I used to install it: npm install ngx-stripe @stripe/stripe-js

Now i try the 12 version and update to you :)

thedarkknight197 commented 1 year ago

It told me that not exist the ngModule class:

'NgxStripeModule' does not appear to be an NgModule class.

Installed with: npm install ngx-stripe@v12-lts @stripe/stripe-js

richnologies commented 1 year ago

I'm puzzle with this one. Any luck on your side @thedarkknight197?

richnologies commented 1 year ago

I'm closing this due to inactivity