Skip to content

TypeError: Class constructor PubSubRoom cannot be invoked without 'new' #79

@brailateo

Description

@brailateo

The docs are outdated?
The example in home page says

const room = Room(ipfs, 'room-test1')

but running node test-pubsub-1.js got

(node:26783) UnhandledPromiseRejectionWarning: TypeError: Class constructor PubSubRoom cannot be invoked without 'new'

after adding new Room got another error:

(node:26834) UnhandledPromiseRejectionWarning: TypeError: this._libp2p.pubsub.getSubscribers is not a function
at PubSubRoom._pollPeers (/old/home/teo/node_modules/ipfs-pubsub-room/src/index.js:106:49)

So , is ipfs-pubsub-room working or just the docs are outdated?
Teo

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