https://github.com/flolu/angular-bazel-socketio3-issue
Bazel + Angular + SocketIO V3 Causes: Cannot access 'XMLHttpRequest' before initialization
https://github.com/flolu/angular-bazel-socketio3-issue
angular bazel socket-io typescript xmlhttprequest
Last synced: 5 months ago
JSON representation
Bazel + Angular + SocketIO V3 Causes: Cannot access 'XMLHttpRequest' before initialization
- Host: GitHub
- URL: https://github.com/flolu/angular-bazel-socketio3-issue
- Owner: flolu
- Created: 2020-11-12T11:25:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-16T12:39:36.000Z (about 5 years ago)
- Last Synced: 2025-02-26T13:32:40.524Z (11 months ago)
- Topics: angular, bazel, socket-io, typescript, xmlhttprequest
- Language: Starlark
- Homepage: https://stackoverflow.com/q/64803424/8586803
- Size: 167 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Socket.IO v3 Issue with Bazel + Angular
## Setup
```
yarn install
```
## Dev Server has Error
```
yarn client:dev
yarn server:dev
```
- error in the browser console http://localhost:4200
```
ERROR TypeError: decodePacket is not a function
at Object.decodePayload (ts_scripts.js?v=89114305:17072)
at XHR.onData (ts_scripts.js?v=89114305:15937)
at Request. (ts_scripts.js?v=89114305:15559)
at Request.Emitter.emit (ts_scripts.js?v=89114305:14385)
at Request.onData (ts_scripts.js?v=89114305:15712)
at Request.onLoad (ts_scripts.js?v=89114305:15768)
at XMLHttpRequest.xhr.onreadystatechange [as __zone_symbol__ON_PROPERTYreadystatechange] (ts_scripts.js?v=89114305:15665)
at XMLHttpRequest.P (zone.min.js?v=7uxoyio8:29)
at e.invokeTask (zone.min.js?v=7uxoyio8:13)
at Object.onInvokeTask (core.umd.js:28179)
```
## Production Works Fine
```
yarn client:prod
yarn server:prod
```
- no errors in the browser console http://localhost:8080
- connect and disconnect logs on the server