I created an Angular Project (v9.0.0) and implemented this socketio p2p library.
When i run it locally through ng serve it works like a charm.
But when I build the project (ng build) there are some problems coming up because of this library.
ERROR in ./node_modules/simple-peer/index.js
Module not found: Error: Can't resolve 'stream' in 'client/node_modules/simple-peer'
resolve 'stream' in 'client/node_modules/simple-peer'
I allready tried adding stream through yarn add stream
At least it builds at this point but I'm getting an error in my browsers console
ERROR TypeError: Cannot read property 'call' of undefined at new Peer
I created an Angular Project (v9.0.0) and implemented this socketio p2p library. When i run it locally through
ng serve
it works like a charm. But when I build the project (ng build
) there are some problems coming up because of this library.I allready tried adding stream through
yarn add stream
At least it builds at this point but I'm getting an error in my browsers consoleThis error references line 29 of index.js with
I have no idea how I could fix this problem.