Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"window.Stripe is not a function" although ssr: false #16

Open
hansemannn opened this issue Jul 20, 2021 · 3 comments
Open

"window.Stripe is not a function" although ssr: false #16

hansemannn opened this issue Jul 20, 2021 · 3 comments

Comments

@hansemannn
Copy link

hansemannn commented Jul 20, 2021

I am trying to integrate the Vue-Stripe library into a PoC project and fail after adding it as a plugin and referencing it in the nuxt.config.ts. The error is:

TypeError: window.Stripe is not a function
    install index.js:1
    use VueJS
    default vue-stripe.js:11
    _callee2$ NuxtJS
    c index.js:1
    _invoke index.js:1
    t index.js:1
    Babel 32
    NuxtJS 12

Stripe should be available via the plugin import, so I am wondering how this can happen. Is the Nuxt integration still meant to work?

@T-Zahil
Copy link

T-Zahil commented Mar 17, 2022

Same issue here 🤔

@AEGx
Copy link

AEGx commented Jul 12, 2022

Same issue here 🎃

@nathantsoi
Copy link

nathantsoi commented Aug 29, 2022

From the example, looks like the following needs to be added to nuxt.conf.js (if using nuxt):

script: [
  { src: 'https://js.stripe.com/v3' },
],

Otherwise, just add the stripe js script to your head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants