angular / dgeni-packages

A collection of dgeni packages for generating documentation from source code.
MIT License
142 stars 101 forks source link

TypeError: dgeni-packages/git #218

Open beagins opened 7 years ago

beagins commented 7 years ago

Added require('dgeni-packages/git') to my Dgeni Package and corresponding gulp task as described in example and on run gulp dgeni from my project directory I get TypeError: Cannot read property '1' of null. Dgeni docs build successfully when I comment out require('dgeni-packages/git').

TypeError: Cannot read property '1' of null
    at gitRepoInfo (/myprojectdir/node_modules/dgeni-packages/git/services/gitRepoInfo.js:11:17)
    at Array.invoke (/myprojectdir/node_modules/di/lib/injector.js:75:15)
    at get (/myprojectdir/node_modules/di/lib/injector.js:48:43)
    at /myprojectdir/node_modules/di/lib/injector.js:71:14
    at Array.map (native)
    at Array.invoke (/myprojectdir/node_modules/di/lib/injector.js:70:31)
    at get (/myprojectdir/node_modules/di/lib/injector.js:48:43)
    at /myprojectdir/node_modules/di/lib/injector.js:71:14
    at Array.map (native)
    at Array.invoke (/myprojectdir/node_modules/di/lib/injector.js:70:31)
viztastic commented 4 years ago

Same issue here

Splaktar commented 3 years ago

You'll get this if https://github.com/angular/dgeni-packages/blob/974173de87add514b1f3f584a97e00a1881873a7/git/services/gitRepoInfo.js#L8

fails to parse the repository.url field in your package.json. For example if the field is missing or it is formatted for SSH like git@github.com:angular/angular.js.git.

ksurendra commented 3 years ago

Updating package.json: as below, solved it for me.

From

"repository": "git@github.com:angular/angular.git",

To:

"repository": {
    "type": "git",
    "url": "https://github.com/angular/angular.git"
  },