This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
jsipfs doesn't work outside of its repo folder #497
Closed
Description
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)