Cookies-EU-banner
Cookies-EU-banner copied to clipboard
launchFunction is not a function
Hello, I have a error message window is not defined
I don't why, I just install and add my script for the file in my nuxt.conf.js. I work with Nuxt JS
import CookiesEuBanner from 'cookies-eu-banner'
export default {
new: CookiesEuBanner(function () {
console.log('hello')
}, true)
}
Sorry for the several edit.
I have the same issue, but I think the title of this ticket is wrong...
This lib is browser-side, not server-side, so it can't be server-side rendered. I do not know much about Nuxt or Next or things like that, but be sure ton put that code on client side only
@Alex-D I'm also using Nuxt, but made sure to instantiate it client-side. window
is available, yet CookiesEuBanner doesn't seem to recognize it (or give the wrong error perhaps).