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

Fails to init with Node.js 11.x - Lock FcntlFlock failed: EINVAL, Invalid argument #1700

Closed
alanshaw opened this issue Nov 7, 2018 · 3 comments
Assignees
Labels
P1 High: Likely tackled by core team if no one steps up

Comments

@alanshaw
Copy link
Member

alanshaw commented Nov 7, 2018

nodejs11.js

const IPFS = require('ipfs')
const node = new IPFS({ repo: '/tmp/ipfs-' + Date.now() })
node.on('ready', () => console.log('ready'))

Output:

$ node --version
v11.1.0
$ node nodejs11.js 
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: Lock FcntlFlock of /tmp/ipfs-1541587567155/repo.lock failed: EINVAL, Invalid argument
    at fs.close (/Users/alan/Desktop/test/node_modules/lock-me/src/unix.js:20:14)
    at /Users/alan/Desktop/test/node_modules/graceful-fs/graceful-fs.js:45:10
    at FSReqCallback.oncomplete (fs.js:148:20)
Emitted 'error' event at:
    at done (/Users/alan/Desktop/test/node_modules/ipfs/src/core/components/init.js:22:14)
    at /Users/alan/Desktop/test/node_modules/async/internal/once.js:12:16
    at next (/Users/alan/Desktop/test/node_modules/async/waterfall.js:21:29)
    at /Users/alan/Desktop/test/node_modules/async/internal/onlyOnce.js:12:16
    at waterfall (/Users/alan/Desktop/test/node_modules/ipfs-repo/src/index.js:138:9)
    at /Users/alan/Desktop/test/node_modules/async/internal/once.js:12:16
    at next (/Users/alan/Desktop/test/node_modules/async/waterfall.js:21:29)
    at /Users/alan/Desktop/test/node_modules/async/internal/onlyOnce.js:12:16
    at _locker.lock (/Users/alan/Desktop/test/node_modules/ipfs-repo/src/index.js:170:16)
    at lockFn (/Users/alan/Desktop/test/node_modules/lock-me/src/index.js:55:16)

dignifiedquire/lock-me#4

@alanshaw alanshaw added status/ready Ready to be worked P1 High: Likely tackled by core team if no one steps up labels Nov 7, 2018
@dignifiedquire
Copy link
Member

There were some fixes done recently in https://github.com/baudehlo/node-fs-ext
Can you check with and without it installed (it is an optional dependency) and also if does pull in the latest version?

@hugomrdias
Copy link
Member

For the record this code doesn't work anymore https://github.com/baudehlo/node-fs-ext/blob/master/fs-ext.js#L139-L146

I have a PR pending to fix this in ipfs-repo.

@hugomrdias
Copy link
Member

ipfs/js-ipfs-repo@9041f4a fixes this issue.

Just npm update

@ghost ghost removed the status/ready Ready to be worked label Nov 19, 2018
@hugomrdias hugomrdias self-assigned this Nov 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 High: Likely tackled by core team if no one steps up
Projects
None yet
Development

No branches or pull requests

3 participants