gitwalk icon indicating copy to clipboard operation
gitwalk copied to clipboard

Installation doesn't work due to nodegit issue

Open aspiers opened this issue 8 years ago • 0 comments

I installed via npm install -g gitwalk as directed, but running gitwalk produces

module.js:472
    throw err;
    ^

Error: Cannot find module '../build/Debug/nodegit.node'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/adam/.npm-packages/lib/node_modules/gitwalk/node_modules/nodegit/lib/nodegit.js:16:12)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

This seems to be the exact issue described by https://github.com/nodegit/nodegit/issues/137, and to some extent https://github.com/nodegit/nodegit/issues/521. According to a comment by @maxkorp, it seems that the nodegit folks were intending to make this error message less cryptic, but didn't get round to it yet. Anyway I found that I could fix this via:

cd ~/.npm-packages/lib/node_modules/gitwalk/node_modules/nodegit
npm install

This forced a build from source, and now it's working.

aspiers avatar Sep 01 '17 12:09 aspiers