Closed rngadam closed 3 years ago
@rngadam Download the repo and open package.json
.
Change line 32: "nodegit": "^0.13.2"
to "nodegit": ">=0.13.2"
. Open your terminal, navigate to the correct parent directory, and run npm install git-hours-master -g
.
Do a party dance.
Hmm, tried what I think is somewhat close
git clone https://github.com/kimmobrunfeldt/git-hours
vi package.json
cd ..
npm install -g ./git-hours
get this:
Error: dlopen(/usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/nodegit.node, 1): no suitable image found. Did find:
/usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/nodegit.node: truncated mach-o error: segment __TEXT extends to 4730880 which is past end of file 2032640
/usr/local/lib/node_modules/git-hours/node_modules/nodegit/build/Release/nodegit.node: truncated mach-o error: segment __TEXT extends to 4730880 which is past end of file 2032640
Looks like I might've been lucky. Trying the exact same thing this morning and it's not working. Can't crack this one. (Literally still have that repo from last night, and commands don't work straight on that. Cloning your way, I get permission errors, which is super weird even though I'm running with full admin rights.)
I was able to install this package with the next steps:
npm install -g nodegit
(believe it is unnecessary)npm install
npm install -g ./git-hours
Now it works like a charm:
/m/c/c/D/P/J/p/profile @ master … > git-hours -a 60 { "v.heathen@gmail.com": { "name": "heathen", "hours": 179, "commits": 337 }, "total": { "hours": 179, "commits": 337 } }
After new release 1.5.0, npx git-hours
works again! Tested with node 14, macOS. The node version is probably quite specific.
with a browser, I get: