Global Is Not Defined At ../node_modules/socket.io-parser/is-buffer.js
thanks in advance for helping me out. I'm trying to connect socket in one of my angular components, but in the console of the browser it throws an error saying that global is not d
Solution 1:
(window as any).global = window
As already mentioned in comment, add the above code in the polyfills.ts
file.
Solution 2:
To fix this issue you need to open the file your_angular_setup/src/polyfills.ts
and then add the line below at the bottom of the file.
(window as any).global = window
and you will see that your issue is fixed.
Solution 3:
In src/index.html in the head add
<script>
var global = global || window;
</script>
Post a Comment for "Global Is Not Defined At ../node_modules/socket.io-parser/is-buffer.js"