I'm using npm install socket.io-stream
I implemented socket.io-stream
on my angular component like this :
import * as io from 'socket.io-client';
import * as ss from 'socket.io-stream';
I just want to create a duplex stream like this :
stream=ss.createStream();
I have this error when I run ng build
:
ERROR in ./node_modules/socket.io-stream/lib/iostream.js
Module not found: Error: Can't resolve 'stream' in '
'C:\Users\geoffroy\Documents\Mines Alès\2A\Stage\WebService based
GUI\WebApp\node_modules\socket.io-stream\lib'
ERROR in ./node_modules/socket.io-stream/lib/blob-read-stream.js
Module not found: Error: Can't resolve 'stream' in
'C:\Users\geoffroy\Documents\Mines Alès\2A\Stage\WebService based
GUI\WebApp\node_modules\socket.io-stream\lib'
I don't understand because on my server.js It seems to work..
I try to run the command npm install stream
and I don't have error with ng build
. But when I launch my application I have a new error in my browser console :
inherits_browser.js:5 Uncaught TypeError: Cannot read property 'prototype' of undefined
at Object.inherits (inherits_browser.js:5)
at Object../node_modules/socket.io-stream/lib/iostream.js (iostream.js:10)
at __webpack_require__ (bootstrap:76)
at Object../node_modules/socket.io-stream/lib/socket.js (socket.js:4)
at __webpack_require__ (bootstrap:76)
at Object../node_modules/socket.io-stream/lib/index.js (index.js:1)
at __webpack_require__ (bootstrap:76)
at Object../node_modules/socket.io-stream/index.js (index.js:2)
at __webpack_require__ (bootstrap:76)
Thanks for your help
from Issue with socket.io-stream importation in Angular 6
No comments:
Post a Comment