N
Nuxt6mo ago
adamreisnz

Nuxt 4 nightly failing on nuxt prepare command

I have followed the guide for opting in to the Nuxt nightly and using future.compatibilityVersion: 4, did this on a brand new clean project just installed with npx nuxi@latest init nuxt-app, however, after running yarn to install new packages, the nuxt prepare command fails with Cannot read properties of undefined (reading 'bind') at loadNuxt This seems to stem from the @nuxt/kit package, specifically this line: nuxt.removeHook || (nuxt.removeHook = nuxt.clearHook.bind(nuxt)); Both nuxt.removeHook and nuxt.clearHook are undefined. I've tried using the @nuxt/kit nightly version as well but to no avail. Does anyone know if this is a known issue, or how to work around it? I am just getting started with Nuxt, and really wanted to start with 4 for a new project instead of 3. (Sorry, there is no nuxt4 tag)
4 Replies
adamreisnz
adamreisnzOP6mo ago
Here is some log output from just before that call
Sam  K
Sam K6mo ago
I have faced the same problem, and removing nightly and install the latest 3.12.2 and set
future: {
compatibilityVersion: 4
},
future: {
compatibilityVersion: 4
},
remove node_modules .nuxtand lock file of your package manager and install everything again
adamreisnz
adamreisnzOP5mo ago
Thanks, I thought you had to use the nightly though, to use the compatibilityVersion 4
Sam  K
Sam K5mo ago
yea that was before 3.12.2
Want results from more Discord servers?
Add your server