jlmakes / jlmakes/scrollreveal

ScrollReveal not working with Next JS (create-next-app) ?

Open
#541 5 comments 0 reactions 0 assignees View on GitHub
Question Third Party
Dominant language
JavaScript
Stars
22.5k
Forks
2.2k
PR merge metrics
No merged PRs in 30d

Description

I have some issues using ScrollReveal with create-next-app.

I installed ScrollReveal with npm, then imported it using ES6 :

`import sr from 'scrollreveal';`

I immediatly have an error message :

Server Error
ReferenceError: document is not defined

I use ScrollReveal with create-react-app, and it works perfectly. So I don't understand.

Thanks.

### Environment

* Operating System: Linux Ubuntu / Windows 10 Pro
* Browser Version: Chrome 90.0.4430.72
* ScrollReveal Version: 4.0.9

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.