cookie-universal icon indicating copy to clipboard operation
cookie-universal copied to clipboard

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

Open gspgsp opened this issue 2 years ago • 12 comments

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)

gspgsp avatar Jan 16 '23 05:01 gspgsp

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.

anz000 avatar Feb 01 '23 17:02 anz000

+1

Mucaccino avatar Feb 08 '23 01:02 Mucaccino

+1

hugoJuhel avatar Feb 17 '23 14:02 hugoJuhel

+1

Eon-10 avatar Feb 21 '23 01:02 Eon-10

+1

sun-ergo-s avatar Mar 09 '23 08:03 sun-ergo-s

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

hg096 avatar Apr 13 '23 06:04 hg096

Having the same problem with the latest version of Nuxt

TheAgonistt avatar May 15 '23 15:05 TheAgonistt

Having the same problem with the latest version of Nuxt

lipecss avatar May 18 '23 01:05 lipecss

+1

ITIFSMTH avatar Jun 29 '23 04:06 ITIFSMTH

+1

andresrl avatar Jul 19 '23 19:07 andresrl

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

noahgregory-basis avatar Sep 20 '23 16:09 noahgregory-basis

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

jornhymcfly avatar Sep 23 '23 17:09 jornhymcfly