Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ERROR] document is not defined #568

Open
Niko7133 opened this issue Oct 8, 2024 · 0 comments
Open

[ERROR] document is not defined #568

Niko7133 opened this issue Oct 8, 2024 · 0 comments

Comments

@Niko7133
Copy link

Niko7133 commented Oct 8, 2024

Hi guys, I'm trying to use Locomotive-scroll with astro, but I'm having big problems, despite having a maximally clean environment and very basic code, I'm getting this error

16:52:09 [ERROR] document is not defined
  Hint:
    Browser APIs are not available on the server.
    
    If the code is in a framework component, try to access these objects after rendering using lifecycle methods or use a "client:only" directive to make the component exclusively run on the client.
    
    See https://docs.astro.build/en/guides/troubleshooting/#document-or-window-is-not-defined for more information.
    
  Stack trace:
    at /Applications/MAMP/htdocs/Developer/Git/Bitozzi-Scale/node_modules/locomotive-scroll/dist/locomotive-scroll.js:261:9
    [...] See full stack trace in the browser, or rerun with --verbose.

I have been looking for the solution for 2 hours, can anyone help me? Pls don't insult me I'm a beginner :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant