user20271243
user20271243

Reputation:

Issue with socket.io-stream during install

Im trying to implement the package socket.io-stream in my Angular project, but after I import it, when I start the project I have this error :

index.js:13 Uncaught ReferenceError: Buffer is not defined
    at 5421 (index.js:13:15)
    at __webpack_require__ (bootstrap:19:1)
    at 841 (index.js:2:1)
    at __webpack_require__ (bootstrap:19:1)
    at 325 (user-connection.service.ts:9:21)
    at __webpack_require__ (bootstrap:19:1)
    at 3010 (contact.component.html:125:125)
    at __webpack_require__ (bootstrap:19:1)
    at 158 (main.js:15:98)
    at __webpack_require__ (bootstrap:19:1)

I have installed the buffer package using npm i buffer nothing changed.

Upvotes: 1

Views: 207

Answers (1)

Drenai
Drenai

Reputation: 12357

There's an Angular wrapper for the library called ngx-socket-io

Good tutorial on getting it up and running

Upvotes: 1

Related Questions