Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

jsipfs doesn't work outside of its repo folder #497

Closed
daviddias opened this issue Sep 15, 2016 · 2 comments · Fixed by #503
Closed

jsipfs doesn't work outside of its repo folder #497

daviddias opened this issue Sep 15, 2016 · 2 comments · Fixed by #503
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@daviddias
Copy link
Member

This is due to the code to check the latest version, which assumes it is being run within that folder https://github.com/ipfs/js-ipfs/blob/master/src/cli/bin.js#L9-L13

This bug was introduced with yargs

error:

» jsipfs swarm connect /ip4/10.0.1.19/tcp/4001/ipfs/QmZGkoEvrdmM8m7cYAT2TNbtaw5hiarbx2Gdxx5BamXMU4
/Users/daviddias/code/js-ipfs/node_modules/update-notifier/index.js:28
                throw new Error('pkg.name and pkg.version required');
                ^

Error: pkg.name and pkg.version required
    at new UpdateNotifier (/Users/daviddias/code/js-ipfs/node_modules/update-notifier/index.js:28:9)
    at module.exports (/Users/daviddias/code/js-ipfs/node_modules/update-notifier/index.js:140:23)
    at Object.<anonymous> (/Users/daviddias/code/js-ipfs/src/cli/bin.js:10:1)
    at Module._compile (module.js:556:32)
    at Object.Module._extensions..js (module.js:565:10)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.runMain (module.js:590:10)
    at run (bootstrap_node.js:394:7)

@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Sep 15, 2016
@dignifiedquire
Copy link
Member

how are you executing? through a global install?

@daviddias
Copy link
Member Author

npm link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants