Skip to content

Can't resolve stream while building #63

Description

@DatL4g

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

This error references line 29 of index.js with

stream.Duplex.call(self, opts)

I have no idea how I could fix this problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions