microcipcip / cookie-universal

Universal cookie plugin, perfect for SSR
525 stars 39 forks source link

Add cookie-universal-nuxt to nuxt.config.ts #148

Open gspgsp opened 1 year ago

gspgsp commented 1 year ago

my nuxt.config is ts,so i add cookie-universal-nuxt to nuxt.config.ts:

export default defineNuxtConfig({ modules: ['@nuxtjs/tailwindcss', '@nuxtjs-alt/proxy','cookie-universal-nuxt'], ... ... })

then:

npx nuxi build Nuxi 3.0.0 12:16:05 Nuxt 3.0.0 with Nitro 1.0.0 12:16:05 ℹ Using Tailwind CSS from ~/assets/css/tailwind.css nuxt:tailwindcss 12:16:05

ERROR this.addPlugin is not a function 12:16:05

at module (node_modules/cookie-universal-nuxt/lib/module.js:10:8) at installModule (node_modules/@nuxt/kit/dist/index.mjs:416:9) at async initNuxt (node_modules/nuxt/dist/index.mjs:1825:7) at async loadNuxt (node_modules/nuxt/dist/index.mjs:1857:5) at async loadNuxt (node_modules/@nuxt/kit/dist/index.mjs:493:19) at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:34:18) at async _main (node_modules/nuxi/dist/cli.mjs:50:20)

anz000 commented 1 year ago

Running into the same issue when using Nuxt 3.1.1 with Nitro 2.1.1. I don't have any other modules in the nuxt.config.ts, so probably seems like a Nuxt 3 compatibility issue.

Mucaccino commented 1 year ago

+1

hugoJuhel commented 1 year ago

+1

eralmendral1 commented 1 year ago

+1

sun-ergo-s commented 1 year ago

+1

hg096 commented 1 year ago

I just tried nuxt 3.4.0 version and I'm having the same problem as this one

TheAgonistt commented 1 year ago

Having the same problem with the latest version of Nuxt

lipecss commented 1 year ago

Having the same problem with the latest version of Nuxt

ITIFSMTH commented 1 year ago

+1

andresrl commented 1 year ago

+1

noahgregory-basis commented 1 year ago

This package appears to not be compatible with Nuxt/Vue 3 at the moment, unfortunately. The author would need to fix it.

jornhymcfly commented 1 year ago

Nuxt 3 has a composable to manage cookies (https://nuxt.com/docs/api/composables/use-cookie). Probably this package will never get updated.