WilliamDASILVA / nuxt-stripe-module

A NuxtJS module to import Stripe client script.
MIT License
114 stars 20 forks source link

[nuxt-stripe-module] Cannot read properties of undefined (reading 'stripe') #49

Open kamran-ashlarglobal opened 2 years ago

kamran-ashlarglobal commented 2 years ago

Hi,

I am using nuxt 2.8.1. with spa mode After Installing the package and adding the following configuration nuxt.conf.js

{
  modules: [
    'nuxt-stripe-module',
  ],
  stripe: {
    publishableKey: 'YOUR_STRIPE_PUBLISHABLE_KEY',
  },
}

I am getting this error. [nuxt-stripe-module] Cannot read properties of undefined (reading 'stripe')

Can anyone guide me on what I am doing wrong?

@WilliamDASILVA

justchrister commented 1 year ago

Same issue for me

TheOnlyRantis commented 1 year ago

Checking to see if any of the contributors know what's going on with this error.

It seems related to this line in module.js: const options = Object.assign({}, defaults, this.options.stripe, moduleOptions)

@WilliamDASILVA

negativems commented 1 year ago

Has anyone found a solution to this error?

asharghi commented 1 year ago

Bumping this. Same issue here with

"nuxt": "^3.4.1", "nuxt-stripe-module": "^3.2.0",

HugoMichard commented 1 year ago

same issue here as well

"nuxt": "^3.6.5", "nuxt-stripe-module": "^3.2.0"

HugoMichard commented 1 year ago

After digging into it, it seems the current package nuxt-stripe-module does not support nuxt3.

This is related to https://github.com/WilliamDASILVA/nuxt-stripe-module/issues/45. As florenzo mentioned here https://github.com/WilliamDASILVA/nuxt-stripe-module/issues/45#issuecomment-1610402690, another package supporting nuxt3 was released and can be found here https://www.npmjs.com/package/nuxt3-stripe.

Following the quick setup there solves the error for me !

paulootavio commented 7 months ago

same issue here as well