1

I want to download and then to customize an ungit project. But when I make:

  • git clone https://github.com/FredrikNoren/ungit

and then

  • npm install -g ./ungit

I can't run, it throws the following error:

module.js:442
    throw err;
    ^

Error: Cannot find module '../src/config'
    at Function.Module._resolveFilename (module.js:440:15)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/ungit/bin/ungit:4:14)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)

When I install it as npm install -g ungit it works flawlessly. I have tried different versions (tags) but same error.

What am I missing?

Anatoly
  • 5,056
  • 9
  • 62
  • 136

1 Answers1

0

One of the Ungit maintainer here. For Ungit's installation please follow installation steps.

tldr; is that you don't need to git clone to install ungit. Infact it probably got confused and executed local copy of ungit rather than globally installed ungit. To fix this, just delete locally install ungit via git clone and try running ungit again.

And I would recommend you using our github issue if you have further issues specific to ungit as it is much easier for us to track issues.

jk-kim
  • 1,136
  • 3
  • 12
  • 20
  • Thank you for your answer! I need to make some changes in source code (make ungit listen only to traffic from localhost, restrict external connections), so I can't install it via `npm install ...` but from source code only. Next time I'll open issue on github, but right now lets complete this answer for future comers. If I understand correctly, I need to run `grunt` (which I missed) and then `npm install -g` from source folder? – Anatoly Jan 19 '17 at 08:26
  • If you need to modify code, you would need to do follow https://github.com/FredrikNoren/ungit/blob/master/CONTRIBUTING.md#getting-started. TLDR; is that `git clone`, `code change`, `grunt`, `npm start`. – jk-kim Jan 19 '17 at 17:40
  • Also, there is IP restriction implemented already for ungit. https://github.com/FredrikNoren/ungit/blob/master/source/config.js#L94 – jk-kim Jan 19 '17 at 17:41