Closed Fiyuva closed 2 months ago
Make sure you have the latest version of Vue in your project (check your lock file). latest
is often not updated by package managers.
Also, why have you pinned Nuxt kit at a pre-v3 version?!
Would you be able to provide a reproduction? 🙏
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/vue@3.4.37_typescript@5.5.4/node_modules/vue/dist/vue.runtime.esm-bundler.js?v=b0613c4f' does not provide an export named 'useId' (at id.js?v=b0613c4f:1:10)
when i update to 3.13.1 from 3.12.4...got this error, downgrade to 3.13.0 it work fine
You have Vue 3.4. Please upgrade to Vue 3.5 and you will be good to go.
I hit this upgrading from 3.11.0
to 3.11.1
; the latest vue requirement is understandable. The only surprise is a patch version introduces an issue.
It's not quite the same stack trace, but it's very similar; it could help debug.
'TypeError: __vite_ssr_import_2__.useId is not a function\n
at callWithErrorHandling (/project/node_modules/.pnpm/@vue+runtime-core@3.4.27/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:195:19)\n
at setupStatefulComponent (/project/node_modules/.pnpm/@vue+runtime-core@3.4.27/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7572:25)\n
at setupComponent (/project/node_modules/.pnpm/@vue+runtime-core@3.4.27/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:7533:36)\n
at renderComponentVNode (/project/node_modules/.pnpm/@vue+server-renderer@3.4.27_vue@3.4.27/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:623:15)\n
at renderVNode (/project/node_modules/.pnpm/@vue+server-renderer@3.4.27_vue@3.4.27/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:755:14)\n
at renderVNodeChildren (/project/node_modules/.pnpm/@vue+server-renderer@3.4.27_vue@3.4.27/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:771:5)\n
at renderVNode (/project/node_modules/.pnpm/@vue+server-renderer@3.4.27_vue@3.4.27/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:743:7)\n
at renderVNodeChildren (/project/node_modules/.pnpm/@vue+server-renderer@3.4.27_vue@3.4.27/node_modules/@vue/server-renderer/dist/server-renderer.cjs.js:771
Make sure you have the latest version of Vue in your project (check your lock file).
latest
is often not updated by package managers.Also, why have you pinned Nuxt kit at a pre-v3 version?!
Hello,
I have the same problem as described above.
The overrides of vue latest is necessary for people using npm and using pinia...
This solution worked for me:
Remove package_lock and folder node_modules Reinstall your dependencies
(Works leaving with overrides vue :) )
Closing as this is not a Nuxt bug per se, but caused by your package manager installing an old version of Vue even though Nuxt depends on a newer one.
This solution worked for me:
Remove package_lock and folder node_modules Reinstall your dependencies
(Works leaving with overrides vue :) )
it worked for me! Thank you
Make sure you have the latest version of Vue in your project (check your lock file).
latest
is often not updated by package managers.Also, why have you pinned Nuxt kit at a pre-v3 version?!
The last time I updated it, it was in this version.
remove package.lock and node_modules not work for me
and put "overrides": { "nuxt": { "vue": "latest" } } in package.json neither. Vue version 3.5.3 and nuxt version 3.13.1
Upgrading Vue to 3.5 solved for me, thank you @danielroe :)
I have the same issue... Can someone help me fix it please? I looked in package.json and I don't even have "vue" in my project. Only nuxt.
node_modules/nuxt/dist/app/composables/id.js (1:9): "useId" is not exported by "node_modules/vue/dist/vue.runtime.esm-bundler.js", imported by "node_modules/nuxt/dist/app/composables/id.js
I have no idea how to fix it, please help me.
@snakysnake Ensure you have the latest version of Vue. You can run npm i vue.
@snakysnake Ensure you have the latest version of Vue. You can run npm i vue.
I see that I have some conflict when trying to npm i vue@latest
.
I try fixing it by running npm i --legacy-peer-deps
. Let's see what happens...
This solution worked for me:
Remove package_lock and folder node_modules Reinstall your dependencies
(Works leaving with overrides vue :) )
Worked for me! How could I forget it
I was able to fix this by deleting node_modules
and package-lock.json
, making the following updates to package.json
, then reinstalling:
Discussed in https://github.com/nuxt/nuxt/discussions/28835