bug: globalThis is not defined #3871
Replies: 6 comments 7 replies
-
Hi, @capacitor/cli: 2.4.3 Installed Dependencies: @capacitor/cli 2.4.3 npm --version |
Beta Was this translation helpful? Give feedback.
-
yes i know, we would like to use the new functionalities added in 6.1, does anyone have a workaround? i tried adding it in polyfills but i could'd get it to work |
Beta Was this translation helpful? Give feedback.
-
this is not a Capacitor issue, moving to discussions so maybe somebody can help you |
Beta Was this translation helpful? Give feedback.
-
This is not a Capacitor issue, |
Beta Was this translation helpful? Give feedback.
-
You can import globalThis as polyfill using this package https://www.npmjs.com/package/@ungap/global-this. I fixed my issue using this polyfill. |
Beta Was this translation helpful? Give feedback.
-
Hello, Install globalthis: Add: |
Beta Was this translation helpful? Give feedback.
-
Bug Report
Capacitor Version
Latest Dependencies:
@capacitor/cli: 2.4.3
@capacitor/core: 2.4.3
@capacitor/android: 2.4.3
@capacitor/electron: 2.4.3
@capacitor/ios: 2.4.3
Installed Dependencies:
@capacitor/cli 2.4.3
@capacitor/core 2.4.3
@capacitor/ios 2.4.3
@capacitor/android 2.4.3
@capacitor/electron not installed
Platform(s)
android
Current Behavior
in the emulator i get the error: E/Capacitor/Console: File: capacitor-runtime.js - Line 361 - Msg: ReferenceError: globalThis is not defined
in the chrome inspector i can see more details about it: ReferenceError: globalThis is not defined
Expected Behavior
app should load correctly
Code Reproduction
ionic app with angular 11 and angularfire 6.1.1 installed (but any other service that caches on globalThis will get this error)
Other Technical Details
npm --version
output:6.14.9
node --version
output:v12.15.0
pod --version
output (iOS issues only):Additional Context
Beta Was this translation helpful? Give feedback.
All reactions