You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just install this package because the ng-socket-io is not working.. this actually pass the first issue with ng-socket-io, but now I'm stuck with this :(
Uncaught ReferenceError: global is not defined
at Object../node_modules/socket.io-parser/is-buffer.js (is-buffer.js:4)
at webpack_require (bootstrap:83)
at Object../node_modules/socket.io-parser/binary.js (binary.js:8)
at webpack_require (bootstrap:83)
at Object../node_modules/socket.io-parser/index.js (index.js:8)
at webpack_require (bootstrap:83)
at Object../node_modules/socket.io-client/lib/index.js (index.js:7)
at webpack_require (bootstrap:83)
at Module../node_modules/ng-io/fesm5/ng-io.js (ng-io.js:1)
at webpack_require (bootstrap:83)
The text was updated successfully, but these errors were encountered:
adding the following polyfills.ts should work in Angular@6:
// Add global to window, assigning the value of window itself.
(window as any).global = window;
In any case, this issue should not be resolved IMO, socket.io-client should either remove the implicit dependency on global, or document that a polyfill is needed (by anyone using the pre-bundled sources, not just Angular users)
So add this on my index.html
<script>window.global = window;</script>
Or better, add this, on your polyfills.ts
(window as any).global = window;
Just install this package because the ng-socket-io is not working.. this actually pass the first issue with ng-socket-io, but now I'm stuck with this :(
Uncaught ReferenceError: global is not defined
at Object../node_modules/socket.io-parser/is-buffer.js (is-buffer.js:4)
at webpack_require (bootstrap:83)
at Object../node_modules/socket.io-parser/binary.js (binary.js:8)
at webpack_require (bootstrap:83)
at Object../node_modules/socket.io-parser/index.js (index.js:8)
at webpack_require (bootstrap:83)
at Object../node_modules/socket.io-client/lib/index.js (index.js:7)
at webpack_require (bootstrap:83)
at Module../node_modules/ng-io/fesm5/ng-io.js (ng-io.js:1)
at webpack_require (bootstrap:83)
The text was updated successfully, but these errors were encountered: