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.

Edge 17- ReferenceError: 'globalThis' is not defined

See original GitHub issue
"@zxing/browser": "^0.0.5",
"@zxing/library": "^0.18.3",

When using this library under Edge 17, I am getting a reference error :

ReferenceError: 'globalThis' is not defined
at @zxing/browser/umd/zxing-browser.js: 65
Screenshot 2020-12-01 at 14 26 59

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
odahcamcommented, Dec 1, 2020

Will Microsoft and it’s browsers never stop breaking JavaScript libraries? I don’t think so.

This approach using globalThis || ... should already solve that, as it does not we gonna need to ponyfill the access of the global object by the library. Well, it’s not gonna be THAT fast to solve, we gonna need to at least create a function that returns the “globalThis” and has lots of typeof inside.

0reactions
odahcamcommented, Jan 27, 2021
Read more comments on GitHub >

github_iconTop 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 >
'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 >
globalThis is not defined although node version is v14.4.0
If you experience errors saying that globalThis is not defined, be sure to run a recent version of Node.js (at least 12.0). node...
Read more >
'globalThis is not defined' in JSS Site - Rock, Paper, Sitecore
[NodeInvocationException: globalThis is not defined ReferenceError: globalThis is not defined at react.Component.react.Component.
Read more >
ReferenceError: globalThis is not defined
ZimBaroo's Geeks Sharing - At ZimBaroo's Geeks we embrace learning as a life style. Here on this blog we Geeks share quick programming...
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