Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

pnpm installation of orbit not working #173

Closed
theobat opened this issue Oct 23, 2016 · 3 comments
Closed

pnpm installation of orbit not working #173

theobat opened this issue Oct 23, 2016 · 3 comments

Comments

@theobat
Copy link
Contributor

theobat commented Oct 23, 2016

I cannot find any version of ipfs supporting the --enable-pubsub-experiment flag, still trying to find out what's going on.

  • In orbit :
➜  orbit git:(master) node_modules/ipfs-daemon/node_modules/go-ipfs-dep/go-ipfs/ipfs --version
ipfs version 0.4.4-dev
➜  orbit git:(master) node_modules/ipfs-daemon/node_modules/go-ipfs-dep/go-ipfs/ipfs --enable-pubsub-experiment
Error: Unrecognized option 'enable-pubsub-experiment'
  • Directly installed pre-packaged binray ipfs version :
➜  orbit git:(master) ipfs --version
ipfs version 0.4.4
➜  orbit git:(master) ipfs --enable-pubsub-experiment
Error: Unrecognized option 'enable-pubsub-experiment'
➜  orbit git:(master) 

It seems orbit uses an old version of ipfs provided by the go-ipfs npm package. This actually breaks the current version of orbit as the flag --enable-pubsub-experiment was added recently (and is incidentally not present in the go-ipfs packaged version)

It seems this is a known issue on the go-ipfs package side as referenced in this npm go-ipfs issue but the issue is idle somehow.

For the record my actual error when running npm start :

2016-10-23T14:14:07.990Z [DEBUG] ipfs-daemon: Starting IPFS daemon
2016-10-23T14:14:08.138Z [ERROR] Orbit.Index-Native: Error: non-zero exit code 1
  while running: /home/theophile/.pnpm/.store/[email protected]/_/subcom 10155 /home/theophile/.pnpm/.store/github+haadcode+js-ipfsd-ctl+HEAD/_/node_modules/go-ipfs-dep/go-ipfs/ipfs daemon --enable-pubsub-experiment

  events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: spawn /home/theophile/.pnpm/.store/github+haadcode+js-ipfsd-ctl+HEAD/_/node_modules/go-ipfs-dep/go-ipfs/ipfs ENOENT
    at exports._errnoException (util.js:1026:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
    at onErrorNT (internal/child_process.js:359:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Module.runMain (module.js:592:11)
    at run (bootstrap_node.js:402:7)
    at startup (bootstrap_node.js:157:9)
    at bootstrap_node.js:521:3

@theobat theobat changed the title Deprecated ipfs version dependency (go-ipfs) Enable-pubsub-experiment flag not recognized Oct 23, 2016
@haadcode
Copy link
Member

Pubsub is enabled if you build go-ipfs from master, or you can download it (somewhat older version) from here: https://dist.ipfs.io/go-ipfs/floodsub-2. Floodsub-2 is what haadcode/go-ipfs-dep package uses.

To run it, you need to start the daemon with the flag: ipfs daemon --enable-pubsub-experiment. That should do it.

Let me know if you're still stuck.

@theobat
Copy link
Contributor Author

theobat commented Oct 23, 2016

thanks @haadcode, my bad i forgot the daemon in the above copypaste (I did run it with and without though the problem was not on ipfs/orbit's end).

The problem resides in the way pnpm handles dependencies I guess... It works perfectly with standard npm install. From my understanding they try to resolve all the dependencies and install every version of an npm package only once in a user defined repo a bit like npm -g would do (and then they symlink to them from each node_module repositories).

I'm going to create an issue on their repo, you can close this.

Note: There is an important (yet not breaking as I thought) problem on npm regarding go-ipfs though, you can reproduce it that way :

  • npm install go-ipfs
  • node_modules/go-ipfs/bin/ipfs version
    You'll get 0.3.11

@theobat theobat changed the title Enable-pubsub-experiment flag not recognized pnpm installation of orbit not working Oct 23, 2016
@haadcode
Copy link
Member

haadcode commented Nov 2, 2016

Closing as requested.

@haadcode haadcode closed this as completed Nov 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants