Closed Kaysem closed 8 months ago
Yeah i'm aware of the issue. Seems to be a problem with cjs and esm imports. I'm very busy at the moment so can't investigate and fix the issue at this time. But feel free to create a PR.
@Kaysem Did you solve the problem?
@tolgahanbeyazoglu you can just add AOS like plugins download aos.
named file like: aos.cliente.js
inside file import AOS from 'aos' import 'aos/dist/aos.css'
export default defineNuxtPlugin(nuxtApp => { console.log(nuxtApp) if (typeof window !== 'undefined') { nuxtApp.AOS = AOS.init() } })
There is a PR ready to be merged at the AOS library, link. But it seems the project is dead. Last update was 5 years ago. I'll try and email the author next week. If that doesn't work I could create a fork and update it myself. But that would not be a elegant solution. Anybody any ideas?
We could maintain it yeah, I'd be down to contribute if you fork and update EDIT: Unrelated but could you update the npm package please? EDIT 2: Oop okay this one's on me for npm, sorry, fixed in #9
Hello, is there any work around for this issue
I think writing your own nuxt3 plugin would work. https://stackoverflow.com/questions/71484930/using-aos-with-nuxt3
You can try this nuxt3-aos it working Good
@Islam8Bahaa Yes, it works smoothly thanks to the module you specified.
The issue is actually because the aos package needs to be transpiled. It should also be added to the list of optimizedDeps. I will do a PR soon.
@BayBreezy We are waiting
I did the PR lol. My bad for not mentioning it here. Its PR #12 @tolgahanbeyazoglu
Yeah nice, in v1.2.2 it seems fixed. Just tried it with a fresh nuxt project (v3.9.0) so closing this issue.
Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.pnpm/lodash.debounce@4.0.8/node_modules/lodash.debounce/index.js?v=ec69d98d' does not provide an export named 'default' (at aos.esm.js?v=ec69d98d:2:8)