Giter Site home page Giter Site logo

Comments (8)

ndastur avatar ndastur commented on August 27, 2024 9

Can't install either. I have an error in the install script

.nvm/versions/node/v12.16.1/lib/node_modules/git-hours/node_modules/promisify-node/utils/args.js:9
var args = func.toString().match(/function\s.*?\(([^)]*)\)/)[1];
                                                             ^

from git-hours.

Ruin0x11 avatar Ruin0x11 commented on August 27, 2024 5

Since the code for this tool was pretty simple, I decided to rewrite it in Rust.

The repository is here: https://github.com/Ruin0x11/jikyuu

from git-hours.

DataGreed avatar DataGreed commented on August 27, 2024

Did not manage to install it via npm on macOS. Tried with sudo, also did not work.

from git-hours.

Philipp122 avatar Philipp122 commented on August 27, 2024

Did not manage to install it via npm on macOS. Tried with sudo, also did not work.

Same Problem here, was not able to install on MacOS Big Sur 11.1. NodeJS and NPM are fully up-to-date

from git-hours.

marekyggdrasil avatar marekyggdrasil commented on August 27, 2024

I found that node 10 was not supported (at least at some instance of time).

I decided to blindly try different versions of node and I accidentally made it work when I switched to node 6.0

$ nvm install 6.0

then I tried the installation again

$ npm install -g git-hours

and the output I got was a succeedo

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
/Users/marek/.nvm/versions/node/v6.0.0/bin/git-hours -> /Users/marek/.nvm/versions/node/v6.0.0/lib/node_modules/git-hours/src/index.js

> [email protected] install /Users/marek/.nvm/versions/node/v6.0.0/lib/node_modules/git-hours/node_modules/nodegit
> node lifecycleScripts/install

[nodegit] Fetching binary from S3.
[nodegit] Completed installation successfully.

> [email protected] postinstall /Users/marek/.nvm/versions/node/v6.0.0/lib/node_modules/git-hours/node_modules/nodegit
> node postinstall.js

/Users/marek/.nvm/versions/node/v6.0.0/lib
└─┬ [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  ├── [email protected] 
  └─┬ [email protected] 
    ├─┬ [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ └─┬ [email protected] 
    │   └─┬ [email protected] 
    │     ├── [email protected] 
    │     ├── [email protected] 
    │     ├─┬ [email protected] 
    │     │ └─┬ [email protected] 
    │     │   ├── [email protected] 
    │     │   └── [email protected] 
    │     └── [email protected] 
    ├─┬ [email protected] 
    │ ├─┬ [email protected] 
    │ │ └── [email protected] 
    │ ├─┬ [email protected] 
    │ │ └── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ ├── [email protected] 
    │ │ │ └─┬ [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   └── [email protected] 
    │ │ └─┬ [email protected] 
    │ │   ├── [email protected] 
    │ │   ├── [email protected] 
    │ │   ├── [email protected] 
    │ │   └── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ └── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ └── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ └── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ ├─┬ [email protected] 
    │ │ │ │ ├── [email protected] 
    │ │ │ │ ├── [email protected] 
    │ │ │ │ ├── [email protected] 
    │ │ │ │ └── [email protected] 
    │ │ │ └── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ ├── [email protected] 
    │ │ │ ├─┬ [email protected] 
    │ │ │ │ ├── [email protected] 
    │ │ │ │ ├── [email protected] 
    │ │ │ │ └── [email protected] 
    │ │ │ └─┬ [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   ├── [email protected] 
    │ │ │   └── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ └── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ ├─┬ [email protected] 
    │ │ │ ├── [email protected] 
    │ │ │ └── [email protected] 
    │ │ ├── [email protected] 
    │ │ └── [email protected] 
    │ ├── [email protected] 
    │ ├── [email protected] 
    │ ├─┬ [email protected] 
    │ │ ├── [email protected] 
    │ │ ├── [email protected] 
    │ │ └── [email protected] 
    │ └─┬ [email protected] 
    │   ├─┬ [email protected] 
    │   │ └── [email protected] 
    │   ├── [email protected] 
    │   ├─┬ [email protected] 
    │   │ └── [email protected] 
    │   ├─┬ [email protected] 
    │   │ ├── [email protected] 
    │   │ ├── [email protected] 
    │   │ ├── [email protected] 
    │   │ ├── [email protected] 
    │   │ ├── [email protected] 
    │   │ └── [email protected] 
    │   ├── [email protected] 
    │   └── [email protected] 
    └─┬ [email protected] 
      └─┬ [email protected] 
        └── [email protected] 

I am no node expert, I suspect something changed in how node works, probably the return type of match function so that there no longer is any returned list and thus no index at [1]. I don't know why... But I have my git-hours working now and I am happy.

from git-hours.

mathieujobin avatar mathieujobin commented on August 27, 2024

please fix this

from git-hours.

MatthieuScarset avatar MatthieuScarset commented on August 27, 2024

Error when trying to install via npm:

npm ERR! code 1
npm ERR! path /usr/local/lib/node_modules/git-hours/node_modules/nodegit
npm ERR! command failed
npm ERR! command sh -c node lifecycleScripts/install
npm ERR! /usr/local/lib/node_modules/git-hours/node_modules/promisify-node/utils/args.js:9
npm ERR!   var args = func.toString().match(/function\s.*?\(([^)]*)\)/)[1];
npm ERR!                                                               ^
npm ERR! 
npm ERR! TypeError: Cannot read property '1' of null
npm ERR!     at module.exports (/usr/local/lib/node_modules/git-hours/node_modules/promisify-node/utils/args.js:9:63)
npm ERR!     at /usr/local/lib/node_modules/git-hours/node_modules/promisify-node/index.js:79:29
npm ERR!     at Array.filter (<anonymous>)
npm ERR!     at processExports (/usr/local/lib/node_modules/git-hours/node_modules/promisify-node/index.js:60:6)
npm ERR!     at module.exports (/usr/local/lib/node_modules/git-hours/node_modules/promisify-node/index.js:112:10)
npm ERR!     at Object.<anonymous> (/usr/local/lib/node_modules/git-hours/node_modules/nodegit/generate/scripts/generateNativeCode.js:3:13)
npm ERR!     at Module._compile (internal/modules/cjs/loader.js:778:30)
npm ERR!     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
npm ERR!     at Module.load (internal/modules/cjs/loader.js:653:32)
npm ERR!     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

from git-hours.

kimmobrunfeldt avatar kimmobrunfeldt commented on August 27, 2024

@Ruin0x11 awesome!

The tool is now installable with Node 14, tested on macOS.

from git-hours.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.