question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

while runnin: window is not defined

See original GitHub issue

after 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:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
nicolasgarniercommented, Aug 31, 2018

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.

0reactions
Engineersticitycommented, Feb 27, 2021

How can this be solved?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve "window is not defined" errors in React and Next.js
1. First solution: typeof · 2. Second solution: the useEffect hook · 3. Third solution: dynamic loading.
Read more >
ReferenceError: window is not defined in JavaScript
The "ReferenceError: window is not defined" error occurs for multiple reasons: ... The window object represents a window containing a DOM document and...
Read more >
Javascript: 'window' is not defined - Stack Overflow
The window object represents an open window in a browser. Since you are not running your code within a browser, but via Windows...
Read more >
[Solved] ReferenceError : window is not defined - ItsJavaScript
Solution 2: If error occurs while running on browser. The window is not defined reference error may also occur in case of browser...
Read more >
How To Solve ReferenceError window is not defined in ...
Fixing a window is not defined error can be quite simple. In most cases, all you will need to do is wrap your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found