richnologies/ngx-stripe

[BUG] Module @stripe/stripe-js has not exported member 'StripeElementsOptions'

Evoluto opened this issue ยท 7 comments

I get this when trying to build today, didn't get it last week.

Error: node_modules/ngx-stripe/lib/components/au-bank-account.component.d.ts:2:10 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.

429 |  
430 | 2 import { StripeElementsOptions, StripeElements, StripeAuBankAccountElement, StripeAuBankAccountElementOptions, StripeAuBankAccountElementChangeEvent } from '@stripe/stripe-js';
431 | ~~~~~~~~~~~~~~~~~~~~~
432 |  
433 |  
434 | Error: node_modules/ngx-stripe/lib/components/card.component.d.ts:2:10 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
435 |  
436 | 2 import { StripeElementsOptions, StripeCardElementOptions, StripeCardElement, StripeElements, StripeCardElementChangeEvent } from '@stripe/stripe-js';
437 | ~~~~~~~~~~~~~~~~~~~~~
438 |  
439 |  
440 | Error: node_modules/ngx-stripe/lib/components/fpx-bank.component.d.ts:2:10 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
441 |  
442 | 2 import { StripeElementsOptions, StripeElements, StripeFpxBankElement, StripeFpxBankElementChangeEvent, StripeFpxBankElementOptions } from '@stripe/stripe-js';
443 | ~~~~~~~~~~~~~~~~~~~~~
444 |  
445 |  
446 | Error: node_modules/ngx-stripe/lib/components/iban.component.d.ts:2:10 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
447 |  
448 | 2 import { StripeElementsOptions, StripeElements, StripeIbanElement, StripeIbanElementOptions, StripeIbanElementChangeEvent } from '@stripe/stripe-js';
449 | ~~~~~~~~~~~~~~~~~~~~~
450 |  
451 |  
452 | Error: node_modules/ngx-stripe/lib/components/ideal-bank.component.d.ts:2:10 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
453 |  
454 | 2 import { StripeElementsOptions, StripeElements, StripeIdealBankElement, StripeIdealBankElementOptions, StripeIdealBankElementChangeEvent } from '@stripe/stripe-js';
455 | ~~~~~~~~~~~~~~~~~~~~~
456 |  
457 |  
458 | Error: node_modules/ngx-stripe/lib/components/payment-element.component.d.ts:2:38 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
459 |  
460 | 2 import { Appearance, StripeElements, StripeElementsOptions, StripePaymentElement, StripePaymentElementChangeEvent, StripePaymentElementOptions } from '@stripe/stripe-js';
461 | ~~~~~~~~~~~~~~~~~~~~~
462 |  
463 |  
464 | Error: node_modules/ngx-stripe/lib/components/payment-request-button.component.d.ts:3:10 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
465 |  
466 | 3 import { StripeElementsOptions, StripeElements, PaymentRequestOptions, PaymentRequest, CanMakePaymentResult, PaymentRequestUpdateOptions, StripePaymentRequestButtonElement, StripePaymentRequestButtonElementOptions, StripePaymentRequestButtonElementClickEvent, PaymentRequestTokenEvent, PaymentRequestPaymentMethodEvent, PaymentRequestSourceEvent, PaymentRequestShippingAddressEvent, PaymentRequestShippingOptionEvent } from '@stripe/stripe-js';
467 | ~~~~~~~~~~~~~~~~~~~~~
468 |  
469 |  
470 | Error: node_modules/ngx-stripe/lib/directives/card-group.directive.d.ts:2:26 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
471 |  
472 | 2 import { StripeElements, StripeElementsOptions } from '@stripe/stripe-js';
473 | ~~~~~~~~~~~~~~~~~~~~~
474 |  
475 |  
476 | Error: node_modules/ngx-stripe/lib/interfaces/stripe-instance.interface.d.ts:2:897 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
477 |  
478 | 2 import { ConfirmAuBecsDebitPaymentData, ConfirmAuBecsDebitSetupData, ConfirmBancontactPaymentData, ConfirmBancontactPaymentOptions, ConfirmCardPaymentData, ConfirmCardPaymentOptions, ConfirmEpsPaymentData, ConfirmEpsPaymentOptions, ConfirmFpxPaymentData, ConfirmFpxPaymentOptions, ConfirmGiropayPaymentData, ConfirmGiropayPaymentOptions, ConfirmIdealPaymentData, ConfirmIdealPaymentOptions, ConfirmP24PaymentData, ConfirmP24PaymentOptions, ConfirmCardSetupData, ConfirmCardSetupOptions, ConfirmSepaDebitPaymentData, ConfirmSepaDebitSetupData, CreatePaymentMethodData, CreateSourceData, CreateTokenIbanData, CreateTokenCardData, CreateTokenPiiData, CreateTokenBankAccountData, PaymentIntent, PaymentMethod, PaymentRequest, PaymentRequestOptions, RedirectToCheckoutOptions, RetrieveSourceParam, SetupIntent, Stripe, StripeCardElement, StripeCardNumberElement, StripeCardCvcElement, StripeElements, StripeElementsOptions, StripeElement, StripeError, StripeIbanElement, Source, Token, TokenCreateParams, ConfirmAcssDebitPaymentData, ConfirmAcssDebitPaymentOptions, ConfirmAfterpayClearpayPaymentData, ConfirmAfterpayClearpayPaymentOptions, ConfirmAlipayPaymentData, ConfirmGrabPayPaymentData, ConfirmGrabPayPaymentOptions, ConfirmKlarnaPaymentData, ConfirmKlarnaPaymentOptions, ConfirmOxxoPaymentData, ConfirmOxxoPaymentOptions, ConfirmSofortPaymentData, ConfirmWechatPayPaymentData, ConfirmWechatPayPaymentOptions, VerifyMicrodepositsForPaymentData, ConfirmAcssDebitSetupData, ConfirmAcssDebitSetupOptions, ConfirmBacsDebitSetupData, ConfirmBancontactSetupData, ConfirmIdealSetupData, ConfirmSofortSetupData, VerifyMicrodepositsForSetupData, ConfirmAlipayPaymentOptions, VerificationSessionResult, ConfirmPayPalPaymentData, ConfirmPayPalSetupData, ConfirmPaymentData, ConfirmAffirmPaymentData, ConfirmAffirmPaymentOptions, ConfirmPromptPayPaymentData, ConfirmPromptPayPaymentOptions, ConfirmPayNowPaymentData, ConfirmPayNowPaymentOptions, ConfirmCustomerBalancePaymentData, ConfirmCustomerBalancePaymentOptions, ConfirmSofortPaymentOptions, ConfirmSofortSetupOptions, ConfirmKonbiniPaymentData, ConfirmKonbiniPaymentOptions, ConfirmUsBankAccountPaymentData, CollectBankAccountForPaymentOptions, ConfirmUsBankAccountSetupData, CollectBankAccountForSetupOptions } from '@stripe/stripe-js';
479 | ~~~~~~~~~~~~~~~~~~~~~
480 |  
481 |  
482 | Error: node_modules/ngx-stripe/lib/services/stripe-elements.service.d.ts:2:190 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
483 |  
484 | 2 import { PaymentRequest, PaymentRequestOptions, StripeCardElementOptions, StripeAuBankAccountElementOptions, StripeCardNumberElementOptions, StripeCardExpiryElementOptions, StripeElements, StripeElementsOptions, StripeFpxBankElementOptions, StripeIbanElementOptions, StripeIdealBankElementOptions, StripePaymentRequestButtonElementOptions, StripePaymentElementOptions } from '@stripe/stripe-js';
485 | ~~~~~~~~~~~~~~~~~~~~~
486 |  
487 |  
488 | Error: node_modules/ngx-stripe/lib/services/stripe-instance.class.d.ts:2:1511 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
489 |  
490 | 2 import { ConfirmAcssDebitPaymentData, ConfirmAcssDebitPaymentOptions, ConfirmAfterpayClearpayPaymentData, ConfirmAfterpayClearpayPaymentOptions, ConfirmAlipayPaymentData, ConfirmAlipayPaymentOptions, ConfirmAuBecsDebitPaymentData, ConfirmAuBecsDebitSetupData, ConfirmBancontactPaymentData, ConfirmBancontactPaymentOptions, ConfirmBoletoPaymentData, ConfirmBoletoPaymentOptions, ConfirmCardPaymentData, ConfirmCardPaymentOptions, ConfirmEpsPaymentData, ConfirmEpsPaymentOptions, ConfirmFpxPaymentData, ConfirmFpxPaymentOptions, ConfirmGiropayPaymentData, ConfirmGiropayPaymentOptions, ConfirmGrabPayPaymentData, ConfirmGrabPayPaymentOptions, ConfirmIdealPaymentData, ConfirmIdealPaymentOptions, ConfirmKlarnaPaymentData, ConfirmKlarnaPaymentOptions, ConfirmOxxoPaymentData, ConfirmOxxoPaymentOptions, ConfirmP24PaymentData, ConfirmP24PaymentOptions, ConfirmCardSetupData, ConfirmCardSetupOptions, ConfirmSepaDebitPaymentData, ConfirmSofortPaymentData, ConfirmWechatPayPaymentData, ConfirmWechatPayPaymentOptions, ConfirmSepaDebitSetupData, CreatePaymentMethodData, VerifyMicrodepositsForPaymentData, ConfirmAcssDebitSetupData, ConfirmAcssDebitSetupOptions, CreateSourceData, CreateTokenIbanData, CreateTokenCardData, CreateTokenPiiData, CreateTokenBankAccountData, PaymentIntent, PaymentMethod, PaymentRequest, PaymentRequestOptions, RedirectToCheckoutOptions, RetrieveSourceParam, SetupIntent, Stripe, StripeCardElement, StripeCardNumberElement, StripeCardCvcElement, StripeConstructorOptions, StripeElements, StripeElementsOptions, StripeElement, StripeError, StripeIbanElement, Source, Token, TokenCreateParams, ConfirmBacsDebitSetupData, ConfirmBancontactSetupData, ConfirmIdealSetupData, ConfirmSofortSetupData, VerifyMicrodepositsForSetupData, VerificationSessionResult, ConfirmPayPalPaymentData, ConfirmPayPalSetupData, ConfirmPaymentData, ConfirmCustomerBalancePaymentData, ConfirmCustomerBalancePaymentOptions, ConfirmPayNowPaymentData, ConfirmPayNowPaymentOptions, ConfirmPromptPayPaymentData, ConfirmPromptPayPaymentOptions, ConfirmAffirmPaymentData, ConfirmAffirmPaymentOptions, ConfirmSofortPaymentOptions, ConfirmSofortSetupOptions, ConfirmKonbiniPaymentData, ConfirmKonbiniPaymentOptions, ConfirmUsBankAccountPaymentData, CollectBankAccountForPaymentOptions, ConfirmUsBankAccountSetupData, CollectBankAccountForSetupOptions } from '@stripe/stripe-js';
491 | ~~~~~~~~~~~~~~~~~~~~~
492 |  
493 |  
494 | Error: node_modules/ngx-stripe/lib/services/stripe.service.d.ts:2:1511 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
495 |  
496 | 2 import { ConfirmAcssDebitPaymentData, ConfirmAcssDebitPaymentOptions, ConfirmAfterpayClearpayPaymentData, ConfirmAfterpayClearpayPaymentOptions, ConfirmAlipayPaymentData, ConfirmAlipayPaymentOptions, ConfirmAuBecsDebitPaymentData, ConfirmAuBecsDebitSetupData, ConfirmBancontactPaymentData, ConfirmBancontactPaymentOptions, ConfirmBoletoPaymentData, ConfirmBoletoPaymentOptions, ConfirmCardPaymentData, ConfirmCardPaymentOptions, ConfirmEpsPaymentData, ConfirmEpsPaymentOptions, ConfirmFpxPaymentData, ConfirmFpxPaymentOptions, ConfirmGiropayPaymentData, ConfirmGiropayPaymentOptions, ConfirmGrabPayPaymentData, ConfirmGrabPayPaymentOptions, ConfirmIdealPaymentData, ConfirmIdealPaymentOptions, ConfirmKlarnaPaymentData, ConfirmKlarnaPaymentOptions, ConfirmOxxoPaymentData, ConfirmOxxoPaymentOptions, ConfirmP24PaymentData, ConfirmP24PaymentOptions, ConfirmCardSetupData, ConfirmCardSetupOptions, ConfirmSepaDebitPaymentData, ConfirmSofortPaymentData, ConfirmWechatPayPaymentData, ConfirmWechatPayPaymentOptions, ConfirmSepaDebitSetupData, CreatePaymentMethodData, VerifyMicrodepositsForPaymentData, ConfirmAcssDebitSetupData, ConfirmAcssDebitSetupOptions, CreateSourceData, CreateTokenIbanData, CreateTokenCardData, CreateTokenPiiData, CreateTokenBankAccountData, PaymentIntent, PaymentMethod, PaymentRequest, PaymentRequestOptions, RedirectToCheckoutOptions, RetrieveSourceParam, SetupIntent, Stripe, StripeCardElement, StripeCardNumberElement, StripeCardCvcElement, StripeConstructorOptions, StripeElements, StripeElementsOptions, StripeElement, StripeError, StripeIbanElement, Source, Token, TokenCreateParams, ConfirmBacsDebitSetupData, ConfirmBancontactSetupData, ConfirmIdealSetupData, ConfirmSofortSetupData, VerifyMicrodepositsForSetupData, VerificationSessionResult, ConfirmPayPalPaymentData, ConfirmPayPalSetupData, ConfirmPaymentData, ConfirmCustomerBalancePaymentData, ConfirmCustomerBalancePaymentOptions, ConfirmPayNowPaymentData, ConfirmPayNowPaymentOptions, ConfirmPromptPayPaymentData, ConfirmPromptPayPaymentOptions, ConfirmAffirmPaymentData, ConfirmAffirmPaymentOptions, ConfirmSofortPaymentOptions, ConfirmSofortSetupOptions, ConfirmKonbiniPaymentData, ConfirmKonbiniPaymentOptions, ConfirmUsBankAccountPaymentData, CollectBankAccountForPaymentOptions, ConfirmUsBankAccountSetupData, CollectBankAccountForSetupOptions } from '@stripe/stripe-js';
497 | ~~~~~~~~~~~~~~~~~~~~~
498 |  
499 |  
500 | Error: src/app/modules/application/user/billing/billing.component.ts:7:3 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
501 |  
502 | 7 StripeElementsOptions,
503 | ~~~~~~~~~~~~~~~~~~~~~
504 |  
505 |  
506 | Error: src/app/modules/auth/register-company/register-company.component.ts:28:3 - error TS2305: Module '"@stripe/stripe-js"' has no exported member 'StripeElementsOptions'.
507 |  
508 | 28 StripeElementsOptions,
509 | ~~~~~~~~~~~~~~~~~~~~~

Got same error today. Yesterday everything was ok.

I reverted to stripe-js v.1.49 and it worked!

npm install @stripe/stripe-js@1.49

That seems to work for now! Thanks!

Thanks @plvbroker, I'll update peer dependencies accordingly and see what the changes are for 1.50.0

Sorry guys for this issue

Hey guys, can you please update to version @stripe/stripe-js@1.51.0

I've been talking to the Stripe Team and it should be fixed in that version

Let me know if that works for you

@richnologies : i've just updated to @stripe/stripe-js@1.51.0 and it works perfectly โœ…

Thanks again for your amazing work

I'm going to close this now. If anyone else still have issues, feel free to open a new issue