Describe the bug
This library does not work with nextJS, because there is already some interaction with window during import time.
To Reproduce
Set up a NextJS + React App and use this library
When compiling the App, you will see an error like this:
- error Error [ReferenceError]: window is not defined
at file:///home/veith/projects/ts/node_modules/.pnpm/reactjs-social-login@2.6.3_react-dom@18.2.0_react@18.2.0/node_modules/reactjs-social-login/dist/reactjs-social-login.modern.js:1:410
at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
at async importModuleDynamicallyWrapper (node:internal/vm/module:431:15) {
digest: undefined
}
NextJS prerenders on the server, where the window object is not defined.
Various work-arounds listed here don't work, because this already happens at import time in this library.
Describe the bug This library does not work with nextJS, because there is already some interaction with
window
during import time.To Reproduce Set up a NextJS + React App and use this library When compiling the App, you will see an error like this:
NextJS prerenders on the server, where the window object is not defined. Various work-arounds listed here don't work, because this already happens at import time in this library.