nuxt: head.addEntry is not a function

Environment


  • Operating System: Linux
  • Node Version: v16.14.0
  • Nuxt Version: 3.0.0-rc.12
  • Nitro Version: 0.6.1
  • Package Manager: npm@8.3.1
  • Builder: vite
  • User Config: buildModules
  • Runtime Modules: -
  • Build Modules: @nuxtjs/tailwindcss@6.1.3

Reproduction

https://github.com/nuxt/framework/

Describe the bug

When i run dev, giving this error

head.addEntry is not a function

at ./node_modules/nuxt/dist/head/runtime/lib/vueuse-head.plugin.mjs:11:8
at fn (./node_modules/nuxt/dist/app/nuxt.mjs:148:27)
at Object.callAsync (./node_modules/unctx/dist/index.mjs:49:19)
at callWithNuxt (./node_modules/nuxt/dist/app/nuxt.mjs:150:23)
at applyPlugin (./node_modules/nuxt/dist/app/nuxt.mjs:94:29)
at Module.applyPlugins (./node_modules/nuxt/dist/app/nuxt.mjs:104:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async createNuxtAppServer (./node_modules/nuxt/dist/app/entry.mjs:30:7)
at async default (./node_modules/@nuxt/vite-builder/dist/runtime/vite-node.mjs:27:18)
at async Object.renderToString (./node_modules/vue-bundle-renderer/dist/runtime.mjs:172:19)

Additional context

No response

Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 11
  • Comments: 18 (3 by maintainers)

Most upvoted comments

@piscis I fixed this issue by yarn or npm add resolutions in package.json, thanks

 "resolutions": {
    "@vueuse/head": "v1.0.0-rc.14"
  }

I can confirm this is caused by a upstream release of @vueuse/head and I was able to fix it with pnpm by overwrite vueuse/head and set it to v1.0.0-rc.14 like so in package.json:

...
"pnpm": {
    "overrides": {
      "@vueuse/head": "v1.0.0-rc.14"
    }
  }
...

For npm resolutions didn’t work but overrides does

 "overrides": {
    "@vueuse/head": "v1.0.0-rc.14"
  }

Then npm install

Have replied in the duplicate issue: https://github.com/nuxt/nuxt.js/issues/15457

Should be fixed, re-install and try again

Some problem, tried fresh install and got this error. Nuxt 3.0.0-rc.13

I installed Nuxt 3.0.0-rc.10, now working. You can try

Some problem, tried fresh install and got this error. Nuxt 3.0.0-rc.13