-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Conversation
e5179d5
to
c799565
Compare
c799565
to
f48aadc
Compare
7c137e6
to
d0144fd
Compare
packages/ipfs/package.json
Outdated
"ipfs-block-service": "^0.17.1", | ||
"ipfs-core-utils": "^0.2.3", | ||
"ipfs-http-client": "^44.1.0", | ||
"ipfs-http-client": "44.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be changed! When I rebased this PR with the js-ipfs
repo changes from the last week, I started getting this error:
Error: Cannot find module 'ipfs-http-client/src/dht/find-peer'
Require stack:
- /Users/vsantos/work/pl/gh/ipfs/js-ipfs/node_modules/libp2p-delegated-peer-routing/src/index.js
- /Users/vsantos/work/pl/gh/ipfs/js-ipfs/packages/ipfs/src/cli/daemon.js
From my analysis so far, using the "ipfs-http-client": "^44.1.0"
will install ipfs-http-client
in js-ipfs/packages/ipfs/node_modules/ipfs-http-client
as a link to its folder, which should be correct! However, the require in libp2p/js-libp2p-delegated-peer-routing/master/src/index.js#L4 does not work with the above error and the tests will not start to run. If I put this fixed version, the dependency will be installed in js-ipfs/node_modules/ipfs-http-client
and the above error will not happen. I am not familiar with lerna dependency mgt and I could not understand yet the issue.
@achingbrain @hugomrdias do you have any idea on the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For posterity, the problem here was that the delegate-* modules depend on a module that resolves to one in the /packages
folder, which other modules in that folder also depend on. So lerna creates symlinks for those modules but then fails to hoist the symlink to the root node_modules
folder.
This is a bit of an edge case as our dependency tree is a little wonky in this case but it also seems like a bug in lerna. The short-term solution is to add the delegate-* modules to the nohoist
list in lerna.json
.
d0144fd
to
d167ca4
Compare
Except for the issue regarding not finding the |
await ipfsA.swarm.connect(ipfsB.peerId.addresses[0]) | ||
// Add peers to addressBook | ||
ipfsA.libp2p.peerStore.addressBook.set(ipfsB.libp2p.peerId, ipfsB.libp2p.multiaddrs) | ||
ipfsB.libp2p.peerStore.addressBook.set(ipfsA.libp2p.peerId, ipfsA.libp2p.multiaddrs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work when ipfsA
or ipfsB
are go-ipfs nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is why the ipfs-http-client
tests are failing in CI..
5196859
to
bceed1b
Compare
FYI CI is green now, this is pending a dht fix libp2p/js-libp2p-kad-dht#194 to be merged/released and the final release of |
abfdbef
to
9cdbd72
Compare
This PR updates libp2p usage to
0.28.x
.The biggest impact in
js-ipfs
is the deprecation ofPeerInfo
, which creates breaking changes in several parts of the libp2p API.For more information you can check the libp2p migration guide and release notes:
Needs:
libp2p@0.28