StevenJPx2 / nugget

Democratize premium animations ✨
https://nugget.stevenjohn.co
MIT License
11 stars 1 forks source link

SmoothScroll & useLocomotive error #1

Closed BayBreezy closed 8 months ago

BayBreezy commented 8 months ago

Hey @StevenJPx2 ,

I was using the module when I came across this issue. When I try to use the <SmoothScroll> component or the useLocomotive composable, I get the error below:

Failed to resolve import "locomotive-scroll" from "node_modules/@fdcn/nugget/dist/runtime/composables/use-locomotive/index.mjs?v=edb9f9ca". Does the file exist?

Screenshot 2024-01-09 at 8 24 25 AM
StevenJPx2 commented 8 months ago

You just need to install locomotive-scroll@beta 😊.

I did this because it does not need to be installed in the entire bundle if the person does not need locomotive scroll.

I'll include it in the docs next time!

By the way, I've created docs page, if you wanna check it out!

Still a MASSIVE WIP and is subject to change.

BayBreezy commented 8 months ago

Awesome! Installing it did save the day. This has to be added to the docs. I did see the link to the docs & I see where it is still being worked on. Docs really help users get up and runnign quickly with your module.

I was also having some issues with the gsap plugin registrations. I had to register the gsap modules manually even after passing them to the composable useGsap. Are you able to take a look at that?

StevenJPx2 commented 8 months ago

Can you tell me which ones so I can check it out? I personally only use ScrollTrigger, and I auto register that.

StevenJPx2 commented 8 months ago

Hey!

I'll close this if you don't have any reproductions, thanks!

BayBreezy commented 8 months ago

Sorry @StevenJPx2 for not getting back to you. I was not able to reproduce the issue. I am however getting another warning

 WARN  Duplicated imports "vAos", the one from ".../node_modules/@fdcn/nugget/dist/runtime/composables/directives.mjs" has been ignored and ".../node_modules/@fdcn/nugget/dist/runtime/composables/use-animate-on-scroll/directive.mjs" is used
StevenJPx2 commented 8 months ago

Hey Behon!

I’ll get that fixed soon… there’s another thing. I’ll also be deprecating <SmoothScroll /> for <Locomotive />. This is to have a more consistent naming scheme against all the other components with their composable counterparts.

I’m moving all of them from separate folders (components, composables) to be in the same folder (functions). On Jan 18, 2024 at 02:42 +0530, Behon Baker @.***>, wrote:

Sorry @StevenJPx2 for not getting back to you. I was not able to reproduce the issue. I am however getting another warning WARN Duplicated imports "vAos", the one from @./nugget/dist/runtime/composables/directives.mjs" has been ignored and @./nugget/dist/runtime/composables/use-animate-on-scroll/directive.mjs" is used — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

BayBreezy commented 8 months ago

Alright cool cool. Just mention me once it is updated. Thanks :)

StevenJPx2 commented 8 months ago

0.3 is pushed! Check it out!

BayBreezy commented 8 months ago

@StevenJPx2 Now, I get this error

Pre-transform error: Failed to resolve import ".../node_modules/@fdcn/nugget/dist/functions/plugin" from "virtual:nuxt:/.../.nuxt/plugins/client.mjs". Does the file exist?

And then the client shows this error

image
StevenJPx2 commented 8 months ago

Thanks for raising this! If you can, please raise a new issue for this.