ReferenceError: globalThis is not defined
See original GitHub issueHey guys its been weeks that my app(ionic angular firebase) was running great in browser as serve or serve -l and on some android devices as build -prod and build as apk or run. but not running on other devices like android v8.1 it was just the blank white screen
now i found a way to remote debug it in chrome devtools, this is the error output:
ReferenceError: globalThis is not defined
at Module.<anonymous> (vendor-es5.js:158248)
at Module.spgP (vendor-es5.js:158400)
at __webpack_require__ (runtime-es5.js:85)
at Module.ZAI4 (main-es5.js:295)
at __webpack_require__ (runtime-es5.js:85)
at Module.zUnb (main-es5.js:647)
at __webpack_require__ (runtime-es5.js:85)
at Object._ (main-es5.js:19)
at __webpack_require__ (runtime-es5.js:85)
at checkDeferredModules (runtime-es5.js:46)
capacitor.handleError @ capacitor-runtime.js:358
capacitor.handleWindowError @ capacitor-runtime.js:378
if i follow in those vendor-es5.js files the error that they is an undefined globalThis. on these lines of angular fire
globalThis.ɵAngularfireInstanceCache || (globalThis.ɵAngularfireInstanceCache = new Map());
help me know what to do in this situation plx and thx in advance
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Top Results From Across the Web
ReferenceError: globalThis is not defined - npm - Stack Overflow
Consider updating your version of node.js to >=12 . globalThis was added in node.js v12.0.0 according to this compatibility table.
Read more >ReferenceError: globalThis is not defined · Issue #2795 - GitHub
ReferenceError : globalThis is not defined at evalmachine.<anonymous>:1:1 at Script.runInContext (vm.js:133:20) at Object.
Read more >globalThis is not defined although node version is v14.4.0
ReferenceError : globalThis is not defined. Run. If you experience errors saying that globalThis is not defined, be sure to run a recent ......
Read more >ReferenceError: globalThis is not defined
Hey guys,. I am working on the ionic project and I am facing one issue. my app is working fine if I run...
Read more >'globalThis' is not defined - Microsoft Community
I am not able to access any files on Microsoft Teams and any time I try to ''globalThis' is not defined" keeps coming...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello,
Install globalthis:
npm install globalthis
Add:
import 'globalthis/auto';
in polyfills.tsThis issue does not seem to follow the issue template. Make sure you provide all the required information.