richnologies / ngx-stripe

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

An accessor cannot be declared in an ambient context. #88

Closed pskpartha closed 4 years ago

pskpartha commented 4 years ago

Using Angular 8 +

ERROR in node_modules/ngx-stripe/lib/components/stripe-card.component.d.ts(16,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/ngx-stripe/lib/components/stripe-card.component.d.ts(18,9): error TS1086: An accessor cannot be declared in an ambient context.
    node_modules/ngx-stripe/lib/components/stripe-card.component.d.ts(20,9): error TS1086: An accessor cannot be declared in an ambient context.
rhozelly commented 4 years ago

Remove node_modules, package-lock.json and uninstall ngx-stripes. And install it all again, then re run your app.

pskpartha commented 4 years ago

Thanks :)

On Mon, Apr 13, 2020 at 6:02 AM rhozelly notifications@github.com wrote:

Remove node_modules and packae-lock.jsonand uninstall ngx-stripes. And install it all again, then re run your app.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/richnologies/ngx-stripe/issues/88#issuecomment-612727334, or unsubscribe https://github.com/notifications/unsubscribe-auth/AECZECGCWQR2YAWHHDWAOZLRMJ6GDANCNFSM4MFUK7ZQ .

-- Sincerely Partha Sarathi Kar

abejoy commented 4 years ago

Hi rhozelly I have tried following your steps, but still no luck getting the same error

abejoy commented 4 years ago

Remove node_modules, package-lock.json and uninstall ngx-stripes. And install it all again, then re run your app.

Hi rhozelly I have tried following your steps, but still no luck getting the same error

is there anything else I can try?

LukasMachetanz commented 4 years ago

Remove node_modules, package-lock.json and uninstall ngx-stripes. And install it all again, then re run your app.

For me the suggested fix does not work either. Any ideas?

abejoy commented 4 years ago

Remove node_modules, package-lock.json and uninstall ngx-stripes. And install it all again, then re run your app.

For me the suggested fix does not work either. Any ideas?

Hey LukasMachetanz, my issue was that I didnt install the right version, check what version of angular you are using and look at which ngx-stripe version you would need to install, for me i had to do npm install ngx-stripe@7.4.4 but yours may be different based on the angular version that you are using.

if that dosent work either try using https://www.npmjs.com/package/ng-stripe-checkout made things a lot easier for me

richnologies commented 4 years ago

I will close this now due to inactivity. Sorry for this library to be abandon for such a long time. A new version of the library has been published that should address this issue. Please give it a try. If the problem persists, please fell free to open it again. The new commitment of the team is to answer in less than a week.

This issue is related to Typescript version. Please, if the problem persists with the new version, let me know.