Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

defu__WEBPACK_IMPORTED_MODULE_3__ is not a function

Has anyone ever encountered this error when using nuxt-auth from this official guide? How did you solve it? I'm stuck here for days.

The error is defu__WEBPACK_IMPORTED_MODULE_3__ is not a function

like image 323
Neville Lemein Avatar asked Jul 09 '26 18:07

Neville Lemein


1 Answers

I had the same issue today with a freshly installed Nuxt 2.15.8 app. Once I added the @nuxtjs/auth-next v.5.0.0-1667386184.dfbbb54 to go with Laravel Sanctum providers the app crashed with same error message. After alot of searching around I found a solution to make the app work again.

In nuxt.config.js add:

build: {
  transpile: [
    'defu'
  ]
}

Hope that helps for you and others having the same issue.

like image 121
tjaydk Avatar answered Jul 14 '26 06:07

tjaydk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!