N
Nuxt2w ago
Bobbo

Upgrading from 3.5.0 to 3.13.2 is breaking build

I used npx nuxi upgrade, as described by the documentation. Now when I try to npm run generate, which in my package.json maps to nuxt generate, I get this;
[12:11:37] ERROR Nuxt Build Error: 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".
file: node_modules/nuxt/dist/app/composables/id.js:1:9

1: import { useId as _useId } from "vue";
[12:11:37] ERROR Nuxt Build Error: 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".
file: node_modules/nuxt/dist/app/composables/id.js:1:9

1: import { useId as _useId } from "vue";
I'm not sure what the issue is to fix, though? Also, the nuxt dependency got moved from dependencies to devDependencies, which would break my deployment process (npm ci --omit=dev && npm run generate).
7 Replies
Bobbo
Bobbo2w ago
I removed my node_modules and package-lock.json and now everything is broken. Can't even install again
Orbis
Orbis2w ago
can you create a minimal reproduction?
Bobbo
Bobbo2w ago
I imagine it's some stupid issue with one package being on an older version and I just have to keep trying to upgrade stuff until I find which.
Orbis
Orbis2w ago
try pnpm dedupe nvm you did delete lockfile already are you using useId in your project?
Bobbo
Bobbo2w ago
... I've rolled back my changes to my package.json and it's still scuffed I'm now getting a bunch of version conflicts on what was a clean setup. restored my package-lock to what's in git, everything is fine, everything is out of date, updating breaks the world Soooo, updating stuff one by one, I seem to have been able to do everything, except pinia;
Package Current Wanted Latest Location Depended by
pinia 2.0.35 2.2.4 2.2.4 node_modules/pinia frontend
Package Current Wanted Latest Location Depended by
pinia 2.0.35 2.2.4 2.2.4 node_modules/pinia frontend
If I try to update it, npm i pinia@^2.2.4, it conflicts;
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vue
npm ERR! peer vue@">= 2.5 < 2.7" from @vue/[email protected]
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.4.0" from [email protected]
npm ERR! node_modules/pinia
npm ERR! dev pinia@"^2.2.4" from the root project
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vue
npm ERR! peer vue@">= 2.5 < 2.7" from @vue/[email protected]
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.4.0" from [email protected]
npm ERR! node_modules/pinia
npm ERR! dev pinia@"^2.2.4" from the root project
this is a bit weird, because I've got @nuxt/pinia to the latest. 🤷‍♂️
Orbis
Orbis2w ago
vue2?
Mads
Mads2w ago
useId is a Vue 3.5 thing. Try installing the latest version of Vue
Want results from more Discord servers?
Add your server