Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

head.addEntry is not a function #15452

Closed
thegears opened this issue Nov 12, 2022 · 18 comments
Closed

head.addEntry is not a function #15452

thegears opened this issue Nov 12, 2022 · 18 comments

Comments

@thegears
Copy link

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

@DomVit5
Copy link

DomVit5 commented Nov 12, 2022

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

@thegears
Copy link
Author

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

@gomorizsolt
Copy link

Same here

@KovacsRoli
Copy link

Same issue for me, tried a fresh install with node 18.0.0 and npm 8.6.0 on macOS and got the same issue for both Nuxt 3.0.0-rc.13 and Nuxt 3.0.0-rc.12. The Nuxt 3.0.0-rc.11 or lover versions work

@I-NOZex
Copy link

I-NOZex commented Nov 12, 2022

+1, fresh install, windows 10
also happens with rc13 & nuxt3@latest ( 3.0.0-rc.14-27802701.2f53495 )

this commit was supposed to fix this: nuxt/framework@83b5c09

@treighmawaka
Copy link

treighmawaka commented Nov 12, 2022

Same here. Confimed on rc12 and rc13. The strangest thing is that everything worked well with the exact same setup.

@vernaillen
Copy link

v1.0.0 of @vueuse/head was released 2 hours ago, so maybe that caused it?
https://github.com/vueuse/head/releases/tag/v1.0.0

I tried fixing @vueuse/head to version 0.9.8, but with no success yet

@piscis
Copy link
Sponsor Contributor

piscis commented Nov 12, 2022

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"
    }
  }
...

@vernaillen
Copy link

@piscis that worked for me too, thx

@quadrat-studio
Copy link

@piscis Worked for me too, thanks!

@AsuraLuo
Copy link

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

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

@Aleksandr-Baranchuk
Copy link

that worked for me too, thx

@isimmons
Copy link

For npm resolutions didn't work but overrides does

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

Then npm install

@ihornovelution
Copy link

Neither "resolutions" nor "overrides" helped me. Still getting "head.addEntry is not a function" error.

@localhousee
Copy link

localhousee commented Nov 12, 2022

Neither "resolutions" nor "overrides" helped me. Still getting "head.addEntry is not a function" error.

Weird, im using override and error is gone

After edit package.json and pnpm install --shamefully-hoist, my page back to normal

@owlnai
Copy link
Contributor

owlnai commented Nov 12, 2022

For NPM, I had to delete package-lock.json because npm seem to ignore overrides when doing subsequent installs.

@treighmawaka
Copy link

Neither "resolutions" nor "overrides" helped me. Still getting "head.addEntry is not a function" error.

For what it's worth, switching to pnpm worked for me.

In a nutshell, remove node_modules and package-lock.json and add the pnpm overrides:

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

Run pnpm install

This should work.

@harlan-zw
Copy link
Contributor

Have replied in the duplicate issue: #15457

Should be fixed, re-install and try again

@manniL manniL closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests