ceramicnetwork / js-ceramic

Typescript implementation of the Ceramic protocol
http://ceramic.network
Other
414 stars 127 forks source link

Ipfs-daemon binary does not run. Missing dependency? #1061

Closed v-stickykeys closed 3 years ago

v-stickykeys commented 3 years ago

This should work

npx @ceramicnetwork/ipfs-daemon

And alternatively this should work

node node_modules/@ceramicnetwork/ipfs-daemon/bin/ipfs-daemon.js

But they result in an error that looks kind of like this

val in ~ λ npx @ceramicnetwork/ipfs-daemon
Cannot find module 'tslib'
Require stack:
- /Users/val/.npm/_npx/90851/lib/node_modules/@ceramicnetwork/ipfs-daemon/node_modules/@overnightjs/logger/lib/index.js
- /Users/val/.npm/_npx/90851/lib/node_modules/@ceramicnetwork/ipfs-daemon/node_modules/@ceramicnetwork/logger/lib/loggers.js
- /Users/val/.npm/_npx/90851/lib/node_modules/@ceramicnetwork/ipfs-daemon/node_modules/@ceramicnetwork/logger/lib/index.js
- /Users/val/.npm/_npx/90851/lib/node_modules/@ceramicnetwork/ipfs-daemon/lib/ipfs-daemon.js
- /Users/val/.npm/_npx/90851/lib/node_modules/@ceramicnetwork/ipfs-daemon/lib/bin/ipfs-daemon.js
- /Users/val/.npm/_npx/90851/lib/node_modules/@ceramicnetwork/ipfs-daemon/bin/ipfs-daemon.js
stbrody commented 3 years ago

I can't repro this:

npx @ceramicnetwork/ipfs-daemon
Swarm listening on /ip4/127.0.0.1/tcp/4011/p2p/QmQ2UGwUNcKttuvp2qkZNd5RAMkReRWneusV6rXfJHs21r
Swarm listening on /ip4/10.0.0.20/tcp/4011/p2p/QmQ2UGwUNcKttuvp2qkZNd5RAMkReRWneusV6rXfJHs21r
Swarm listening on /ip4/127.0.0.1/tcp/4012/ws/p2p/QmQ2UGwUNcKttuvp2qkZNd5RAMkReRWneusV6rXfJHs21r
Swarm listening on /ip4/10.0.0.20/tcp/4012/ws/p2p/QmQ2UGwUNcKttuvp2qkZNd5RAMkReRWneusV6rXfJHs21r
IPFS API server listening on 5011
IPFS Gateway server listening on 9011
Peer discovery is not supported for ceramic network undefined. This node may fail to load documents from other nodes on the network
ukstv commented 3 years ago

Do you have tslib installed globally maybe?

ukstv commented 3 years ago

Hmm, nope. Added tslib globally, does not make it work.

stbrody commented 3 years ago

I added a dep on tslib to the logger package in https://github.com/ceramicnetwork/js-ceramic/pull/1064. But I can't really test that it actually fixes anything. Can one of you try making the change locally and see if it fixes it?

ukstv commented 3 years ago

I am pretty sure it fixes the issue. Can run with npx and usual install after it is released somehow.

ukstv commented 3 years ago

@valmack can close?

v-stickykeys commented 3 years ago

Yes!