dgeni-packages icon indicating copy to clipboard operation
dgeni-packages copied to clipboard

TypeError: dgeni-packages/git

Open beagins opened this issue 8 years ago • 3 comments

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)

beagins avatar Apr 18 '17 21:04 beagins

Same issue here

viztastic avatar Sep 13 '20 12:09 viztastic

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 [email protected]:angular/angular.js.git.

Splaktar avatar Aug 20 '21 01:08 Splaktar

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

From

"repository": "[email protected]:angular/angular.git",

To:

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

thesurenk avatar Sep 24 '21 18:09 thesurenk