Installing js-ipfs with one version of node then starting it with another crashes the process leaving the repo lock file in place.
Steps to reproduce the error:
For example use node 10 to install js-ipfs then run it with node 8, it explodes as you'd expect:
$ jsipfs files mkdir --help
/path/to/js-ipfs/node_modules/ipfs-repo/node_modules/bindings/bindings.js:88
throw e
^
Error: The module '/path/to/js-ipfs/node_modules/ipfs-repo/node_modules/leveldown/build/Release/leveldown.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
..but then realise your mistake and switch back to node 10:
$ jsipfs files mkdir --help
/path/to/js-ipfs/src/cli/utils.js:68
throw err
^
Error: can't lock file /Users/me/.jsipfs/repo.lock: has non-zero size
at fs.stat (/path/to/js-ipfs/node_modules/ipfs-repo/node_modules/lock-me/src/unix.js:11:19)
at FSReqWrap.oncomplete (fs.js:153:5)
Type: Bug
Severity: Medium
Description:
Installing js-ipfs with one version of node then starting it with another crashes the process leaving the repo lock file in place.
Steps to reproduce the error:
For example use node 10 to install js-ipfs then run it with node 8, it explodes as you'd expect:
..but then realise your mistake and switch back to node 10: