AckerApple / stripe-angular

Angular to Stripe module containing useful providers, components, and directives
MIT License
48 stars 17 forks source link

stripe-angular"' has no exported member 'Token' #51

Closed shreena-tagline closed 3 years ago

AckerApple commented 3 years ago

You won.

We were having a contest for an issue ticket with the least amount of details. Your ticket has nothing and you’ve won what you’ve given us, nothing

yringler commented 3 years ago

Maybe OP need to add the peer dependency on the stripe types? Doing a bit of mind reading here.

On Fri, Mar 12, 2021, 7:23 AM Acker Dawn Apple @.***> wrote:

You won.

We were having a contest for an issue ticket with the least amount of details. Your tickets has nothing and you’ve won what you’ve given us. Nothing

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AckerApple/stripe-angular/issues/51#issuecomment-797457948, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA7B3KPKLVDREL2C2WMJDLLTDH2TNANCNFSM4ZBUO26A .

Cuperino commented 3 years ago

When upgrading from stripe-angular version 1.4.3 to any newer version, such as 1.5.3, I get an error indicating /node_modules/stripe-angular/stripe-angular"' has no exported member 'StripeToken' on the pages where I import { StripeToken } from "stripe-angular". My suspicion this import was deprecated and I need to rewrite my code to use stripe.Token instead.

I'm not sure if I'm correct here but I think the author of this issue was either looking for enlightenment on how to proceed with this or is simply not familiar with regressions and deprecations, and thought there was something wrong with the library. Whichever the case, I know I'm looking for enlightenment on how to proceed from here.

yringler commented 3 years ago

My suspicion this import was deprecated and I need to rewrite my code to use stripe.Token

Correct, this is what I meant by my previous comment.

More at length -

As per - version 1.5? - this project now uses the official stripe JS SDK typings, instead of the ones which had been bundled with this project. So the old import, which imported the type from stripe-angular, won't work.

Install the peer depenency, @types/stripe-v3 delete the error imports import from stripe

if you autocomplete in vscode etc, it should find the right import for you.

AckerApple commented 3 years ago

OHHHHHHHHHHHHHHHH @yringler you are top shelf.

I got it. I will review change logs to make mention

AckerApple commented 3 years ago

I have highlighted this change in the changelog. Its only in the development branch for now but any next work will push it to master

https://github.com/AckerApple/stripe-angular/blob/development/CHANGELOG.md#151---2021-01-04