-
Notifications
You must be signed in to change notification settings - Fork 1.2k
vue-ipfs Can't resolve 'dns' in '/home/xxx/dev/group/node_modules/multiaddr/src/resolvers' #3441
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
The lines about dns is a warning, not an error. You can see in the multiaddr source that when it can't load the The websocket console errors are are similar to that reported in #2938 and will be resolved by IPFS upgrading to libp2p@0.30.x which is in progress at #3427.
Please refer the core-api documentation, it explains the API methods you are trying to invoke: // no
const cid = await ipfs.add(doc)
// yes - https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfsadddata-options
const { cid } = await ipfs.add(doc) // no
let res = await ipfs.cat('https://cid.ipfs.io/#'+cid.path)
// yes - https://github.com/ipfs/js-ipfs/blob/master/docs/core-api/FILES.md#ipfscatipfspath-options
const bufs = []
for await (const buf of ipfs.cat(cid)) {
bufs.push(buf)
}
// ...do something with bufs Please can you use https://discuss.ipfs.io/ for this sort of request in future, questions asked there are much more visible than github issues which tend to vanish after they've been closed. |
Silences this sort of warning which [people report as an error](ipfs/js-ipfs#3441): ``` 98% after emitting CopyPlugin WARNING Compiled with 1 warning 21:06:05 warning in ./node_modules/multiaddr/src/resolvers/dns.js Module not found: Error: Can't resolve 'dns' in '/home/david/dev/group/node_modules/multiaddr/src/resolvers' ```
using npm run serve (@vue/cli),
i've got first this error
then i get this error in the browser
my code is like that
with this package.json
--> it seems that
this.id , this.agentVersion & ifps.add(doc) works
but not ifps.cat() even for res1 or res
ws looks at 127.0.0.1:8081 for pears whereas my app is on port 8080
Does anyone see any possible fix ?
The text was updated successfully, but these errors were encountered: