orbitdb / orbit-db-cli

CLI for orbit-db
MIT License
61 stars 15 forks source link

After running the command 'npm install --global orbit-db-cli', can't find the command 'orbitdb'? #17

Open minxinping0105 opened 6 years ago

minxinping0105 commented 6 years ago

the OS system is ubuntu14.04, and the nodejs is manual built form source After runing the command 'npm install --global orbit-db-cli', I can't find the 'orbitdb' in /my nodejs folder/bin, but I can't run './orbitdb create hello feed', the error is following:

Error: ENOTDIR: not a directory, mkdir '/root/OrbitDB/nodejs8.11.1/node-v8.11.1-linux-x64/bin/orbitdb/ipfs'
guisantos commented 6 years ago

I'm facing a similar issue, after install orbit-db-cli I try to execute orbitdb or orbitdb help and nothing happens. Windows 10 x64

Edit---

After some research I discovered that IPFS and OrbitDB are not yet supported on windows.

RichardLitt commented 6 years ago

I'm having a ton of errors just installing it, and it seems to hang.

09:31 ~/src/orbitdb/welcome (coc) πŸ•  npm i -g orbit-db-cli
npm WARN deprecated bignumber.js@6.0.0: Custom ALPHABET bug fixed in v7.0.2
events.js:182β–‘β–‘β–‘β–‘β–‘β–‘βΈ© β Ό extract:ipld-bitcoin: sill extract is-ipfs@0.3.2
      throw er; // Unhandled 'error' event
      ^

Error: write after end
    at writeAfterEnd (_stream_writable.js:220:12)
    at PassThrough.Writable.write (_stream_writable.js:271:5)
    at PassThrough.Writable.end (_stream_writable.js:528:10)
    at ReadEntry.entry.on (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
    at emitOne (events.js:120:20)
    at ReadEntry.emit (events.js:210:7)
    at ReadEntry.emit (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
    at ReadEntry.[maybeEmitEnd] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
    at ReadEntry.end (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
    at Unpack.[consumeBody] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
    at Unpack.[consumeChunkSub] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
    at Unpack.[consumeChunk] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
    at Unzip.(anonymous function).on.chunk (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
    at emitOne (events.js:115:13)
    at Unzip.emit (events.js:210:7)
    at Unzip.emit (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
events.js:182β–‘β–‘β–‘β–‘β–‘β–‘βΈ© β ΄ extract:ipld-git: sill extract is-ipfs@0.4.7
      throw er; // Unhandled 'error' event
      ^

Error: write after end
    at writeAfterEnd (_stream_writable.js:220:12)
    at PassThrough.Writable.write (_stream_writable.js:271:5)
    at PassThrough.Writable.end (_stream_writable.js:528:10)
    at ReadEntry.entry.on (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
    at emitOne (events.js:120:20)
    at ReadEntry.emit (events.js:210:7)
    at ReadEntry.emit (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
    at ReadEntry.[maybeEmitEnd] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
    at ReadEntry.end (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
    at Unpack.[consumeBody] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/βΈ¨        β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘βΈ© β ΄ extract:ipld-git: sill extract istar/lib/parse.js:210:13)
    at Unpack.[consumeChunkSub] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
    at Unpack.[consumeChunk] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
    at Unzip.(anonymous function).on.chunk (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
    at emitOne (events.js:115:13)
    at Unzip.emit (events.js:210:7)
    at Unzip.emit (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
events.js:182β–‘β–‘β–‘β–‘β–‘β–‘βΈ© β ΄ extract:is-ipfs: sill extract orbit-db-counterstore@1.4.
      throw er; // Unhandled 'error' event
      ^

Error: write after end
    at writeAfterEnd (_stream_writable.js:220:12)
    at PassThrough.Writable.write (_stream_writable.js:271:5)
    at PassThrough.Writable.end (_stream_writable.js:528:10)
    at ReadEntry.entry.on (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/pacote/lib/extract-stream.js:19:41)
    at emitOne (events.js:120:20)
    at ReadEntry.emit (events.js:210:7)
    at ReadEntry.emit (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
    at ReadEntry.[maybeEmitEnd] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:249:12)
    at ReadEntry.end (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:162:27)
    at Unpack.[consumeBody] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:210:13)
    at Unpack.[consumeChunkSub] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:391:40)
    at Unpack.[consumeChunk] (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:362:30)
    at Unzip.(anonymous function).on.chunk (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/lib/parse.js:291:59)
    at emitOne (events.js:115:13)
    at Unzip.emit (events.js:210:7)
    at Unzip.emit (/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/npm/node_modules/tar/node_modules/minipass/index.js:296:25)
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/package.json'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/package.json'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/.eslintignore'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/.eslintignore'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/.travis.yml'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/.travis.yml'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/appveyor.yml'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/appveyor.yml'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/CHANGELOG.md'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/CHANGELOG.md'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/circle.yml'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/circle.yml'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/LICENSE'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/LICENSE'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-5dbc09ed/README.md'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/README.md'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-92301a4e/stats.md'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-e2279446/dist/index.min.js'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-42e991c5/dist/index.js.map'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/peer-id-0db34d52/dist/index.min.js'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/peer-id-2295966b/dist/index.min.js'
npm ERR! cancel after 1 retries!
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-54db230f/dist/index.min.js'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/libp2p-crypto-11a551bf/dist/index.min.js'
WARN tar ENOENT: no such file or directory, open '/Users/richard/.nvm/versions/node/v8.1.0/lib/node_modules/.staging/ipfs-656bdcca/dist/index.min.js'
aphelionz commented 6 years ago

@minxinping0105 Just to clarify - are you running ./orbitdb create hello feed or orbitdb create hello feed without the period and forward slash?

@RichardLitt There look to be some similar issues going on here with ionic repositories. Is there a stale version of npm, a recent upgrade, or a stale cache?

After running

npm install -g npm@latest
npm cache verify
npm i 

What are the results?

I only ask because I spun up a new Ubuntu 14.04 server, installed Node 8.12.0 binaries, and successfully installed orbit-db-cli, with no issues:

$ wget https://nodejs.org/dist/v8.12.0/node-v8.12.0-linux-x64.tar.xz 
$ tar xf node-v8.12.0-linux-x64.tar.xz
$ cd node-v8.12.0-linux-x64/bin
$ export PATH=`pwd`:$PATH
$ ./npm i -g orbit-db-cli
$ orbitdb
# Displays expected usage message
RichardLitt commented 6 years ago

Thanks @aphelionz. I just tried installing again, after having switched Node versions recently, and it works now. Unfortunately, I'm not sure what versions I was using above.

08:43 ~/src/orbitdb/orbit-db-cli (master) πŸ•  npm --v
6.4.1
08:43 ~/src/orbitdb/orbit-db-cli (master) πŸ•  nvm ls
         v8.1.0
        v10.1.0
->     v10.11.0
         system
default -> v10.11 (-> v10.11.0)
node -> stable (-> v10.11.0) (default)
stable -> 10.11 (-> v10.11.0) (default)
iojs -> N/A (default)
08:43 ~/src/orbitdb/orbit-db-cli (master) πŸ•

Can't replicate bug anymore. \o/.