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

ENOTDIR: not a directory on start on Mac #2014

Closed
MicrowaveDev opened this issue May 2, 2019 · 1 comment
Closed

ENOTDIR: not a directory on start on Mac #2014

MicrowaveDev opened this issue May 2, 2019 · 1 comment

Comments

@MicrowaveDev
Copy link
Contributor

  • Version: 0.4.8
  • Platform: Darwin mac.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Type: Bug

Severity: Critical

Description: Error on trying to start on Mac

{ [Error: ENOTDIR: not a directory, rmdir '/Users/jonybang/.jsipfs/repo.lock']
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'rmdir',
  path: '/Users/jonybang/.jsipfs/repo.lock' }

Steps to reproduce the error:

const IPFS = require('ipfs');

module.exports = async () => {
    const node = new IPFS();

    try {
        await new Promise((resolve, reject) => {
            node.on('ready', (err) => err ? reject(err) : resolve());
            node.on('error', (err) => reject(err))
        });
        console.log('🎁 IPFS node have started');
    } catch (e) {
        console.error('❌ IPFS not started', e);
    }
};
@alanshaw
Copy link
Member

alanshaw commented May 3, 2019

Ensure there's no IPFS node running and if there's is, stop it and then try again. Two IPFS nodes can't use the same repo at the same time.

If that doesn't work and there's no nodes running then remove that file with rm /Users/jonybang/.jsipfs/repo.lock and then try again.

@alanshaw alanshaw closed this as completed May 3, 2019
@momack2 momack2 added this to Done in ipfs/js-ipfs May 10, 2019
@momack2 momack2 added this to Done in ipfs/js-waffle May 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

2 participants