Closed alichtman closed 3 years ago
Same error, same macOS version
module.js:545
throw err;
^
Error: Cannot find module '../build/Debug/nodegit.node'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/git-hours/node_modules/nodegit/dist/nodegit.js:18:12)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/local/lib/node_modules/git-hours/src/index.js:4:11)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
node-pre-gyp ERR! stack Error: 403 status code downloading tarball https://nodegit.s3.amazonaws.com/nodegit/nodegit/nodegit-v0.13.2-node-v59-darwin-x64.tar.gz
Seems like the file it's not publicly available
Same installation, ending with (which seems to indicate installed ok) [nodegit] Building manually. (You'll be here a while.) [nodegit] Regenerating and configuring code
but Same error Error: Cannot find module '../build/Debug/nodegit.node'
So I tried installing nodegit on it's own (to get a more recent version) and it complained (with this most relevant line): /usr/local/lib/node_modules/nodegit/vendor/libssh2/missing: Unknown `--is-lightweight' option
the libssh2 repo says to update the OSX cmdLine tools w/sudo xcode-select --install
That allowed me to install nodegit - but the git-hours repo won't use it, it tries to build it's own and then symlink it's internal copy into the main /usr/local/lib/node_modules folder !!
argh!!
Same here. Any work around?
gtm (git-time-metrics)
and the maintainer of that package is looking at putting the git-hours capability into his package
Al;
- Here & Now
On May 17, 2018, at 5:56 PM, Winston Van notifications@github.com wrote:
Same here. Any work around?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kimmobrunfeldt/git-hours/issues/34#issuecomment-390026241, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbF9bS4QSFJGs28EfgWqNAe1H9-ksHQks5tzfH3gaJpZM4TWKQv.
I had the exact same issue.
So I directly put copy nodegit.node
file to '../build/Debug/nodegit.node'
(files from '/usr/local/lib/node_modules/nodegit/build/Release/nodegit.node'
- npm global repo)
Then it works like charm !
@ruucm solution worked for me on Ubuntu 16.
I installed nodegit with npm install -g nodegit
. I ran into a number of errors on a new Ubuntu 16 image. I had to first install typical dev libs (ssl, curl, other build tools). Then I needed to install n
and use that to switch to node v6.14.4
. Once I got nodegit installed, I did:
sudo mkdir -p /usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/
and then
sudo cp /usr/local/lib/node_modules/nodegit/build/Release/nodegit.node /usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/
I got it working by first installing nodegit separately and then doing cp ~/.nvm/versions/node/v10.8.0/lib/node_modules/nodegit/build/Release/nodegit.node ~/.nvm/versions/node/v10.8.0/lib/node_modules/git-hours/node_modules/nodegit/build/Release
I'm using nvm so that's where my node packages get installed but you can copy from wherever you find nodegit.node to wherever git-hours looks for it
After new release 1.5.0, npx git-hours
works again! Tested with node 14, macOS. The node version is probably quite specific.
System Information