This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
pubsub err #1546
Comments
Hi @mccoysc can you provide some more information? Do you have a code example you can paste here? |
Closed
I think this might be the same issue: import React from 'react';
import IPFS from 'ipfs';
class ErrorCases extends React.Component {
constructor() {
super();
this.node = new IPFS({
repo: String(Math.random() + Date.now()),
Experimental: {
pubsub: true,
},
config: {
Addresses: {
Swarm: [
'/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star',
],
},
},
});
}
componentDidMount() {
this.node.once('ready', () => {
this.node.pubsub.subscribe('topic', console.log).catch(console.error);
});
}
render() {
return null;
}
} |
Fixed this btw. |
Yes, the @mccoysc this is likely the cause of your problem too. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Error: Cannot read property 'subscribe' of undefined
at parseError (C:\Users\mccoyzhou\AppData\Roaming\npm\node_modules\ipfs\node_modules\ipfs-api\src\utils\send-request.js:17:17)
at ClientRequest. (C:\Users\mccoyzhou\AppData\Roaming\npm\node_modules\ipfs\node_modules\ipfs-api\src\utils\send-request.js:47:14)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at ClientRequest.emit (events.js:211:7)
at HTTPParser.parserOnIncomingClient (_http_client.js:551:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:115:23)
at Socket.socketOnData (_http_client.js:440:20)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
The text was updated successfully, but these errors were encountered: