motion
motion copied to clipboard
Compatibility Issue on Nuxt 3
Hi there,
I'm having troubles using the latest version of the vueuse/motion with nuxt 3 when I follow the the Doc about Nuxt Usage.
If you pass the:
'@vueuse/motion/nuxt'
The error returned is about: Cannot start nuxt: Package subpath './nuxt' is not defined by "exports" in...
I tried a few thing, but not solve my problem: I tried to change the version of beta.12 to beta.23 and I removed too the /nuxt on nuxt.config.ts. The error changed, but still there.
Nuxt 3.0.0-rc.13 @vueuse/motion": "^2.0.0-beta.12
Does have someone with the same problem and found a solution?
Same problem.
Problem might be in the deprecated addAutoImportDir
function used in the nuxt module, it should be replaced with addImportsDir
.
Also the publicRuntimeConfig
option used in the module is no longer present in nuxt 3, as it was replaced with runtimeConfig.public
.
I've made a patch to fix the compatibility of @vueuse/motion beta.24 with nuxt 3.0.0 stable release, you can find it here and apply it with yarn patch-package.
@grunghi can you maybe create a PR with that fix so that @antfu can merge it?
Thanks @grunghi . If this patch can be merged it will helps a lot.
The patch doesn't seem to work on my end, trying to use it with yarns native patch support.
It's the module builder that needs to be updated, this patch can't just be changed to a PR unfortunately, I think the package.json needs to be updated on the module builder parts, and then republished.
/cc @Tahul
Anyone have it working in nuxt3 yet?
Anyone have it working in nuxt3 yet?
Seems like there was an unannounced release of beta-25
that you can use now!
"@vueuse/motion": "2.0.0-beta.25",
Works fine with nuxt 3.0. ๐โจ
Anyone have it working in nuxt3 yet?
Seems like there was an unannounced release of
beta-25
that you can use now!
"@vueuse/motion": "2.0.0-beta.25",
Works fine with nuxt 3.0. ๐โจ
can this be the default ver when we install? @Tahul
Cannot install @vueuse/motion with Nuxt 3.2.3. Is there a particular way to install it for Nuxt 3 that I have missed?
Here is the Error report:
EDIT: ni -D @vueuse/[email protected] works
17:33:25 on main โน โญ)โโ> ni -D @vueuse/motion โโ(Tue,Mar07)โโ npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/vue npm ERR! peer vue@">= 3.0.0 < 4" from @fortawesome/[email protected] npm ERR! node_modules/@fortawesome/vue-fontawesome npm ERR! @fortawesome/vue-fontawesome@"^3.0.2" from the root project npm ERR! peer vue@"^3.2.47" from @nuxt/[email protected] npm ERR! node_modules/@nuxt/vite-builder npm ERR! @nuxt/vite-builder@"3.2.3" from [email protected] npm ERR! node_modules/nuxt npm ERR! peer nuxt@"^3.0.0" from @vueuse/[email protected] npm ERR! node_modules/@vueuse/nuxt npm ERR! dev @vueuse/nuxt@"^9.13.0" from the root project npm ERR! 1 more (the root project) npm ERR! 10 more (@unhead/vue, @vitejs/plugin-vue, ...) npm ERR! npm ERR! Could not resolve dependency: npm ERR! dev @vueuse/motion@"" from the root project npm ERR! 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.1" from @vueuse/[email protected] npm ERR! node_modules/@vueuse/motion npm ERR! dev @vueuse/motion@"" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! npm ERR! For a full report see: npm ERR! /Users/sueholder/.npm/_logs/2023-03-07T17_34_20_532Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: npm ERR! /Users/sueholder/.npm/_logs/2023-03-07T17_34_20_532Z-debug-0.log
Anyone have it working in nuxt3 yet?
Seems like there was an unannounced release of
beta-25
that you can use now!"@vueuse/motion": "2.0.0-beta.25",
Works fine with nuxt 3.0. ๐โจcan this be the default ver when we install? @Tahul
I wish it could but that would send renovate updates to all the projects that uses it and I'm not ready to handle that. :(
I wish I could find some maintainers and contributors to that project that helped me on the day-to-day tasks!