while runnin: window is not defined
See original GitHub issueafter installing the package and requiring it. while running this error is coming:
ReferenceError: window is not defined
at F:\E-Commerce\shopping-cart\node_modules\firebaseui\dist\npm.js:30:129
at Object.<anonymous> (F:\E-Commerce\shopping-cart\node_modules\firebaseui\dist\npm.js:357:338)
at Module._compile (module.js:635:30)
at Object.Module._extensions…js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:\E-Commerce\shopping-cart\app.js:10:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shopping-cart@0.0.0 start: node ./bin/www
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shopping-cart@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\ACER\AppData\Roaming\npm-cache_logs\2018-06-09T11_33_15_788Z-debug.log
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
SSR in environments such as react or nextjs (and such) is not supported by firebaseUI which relies on using the DOM.
Try to avoid loading and runing FirebaseUI on the server. For instance by loading it in
componentDidMount()
in React.How can this be solved?