Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: dgeni-packages/git #218

Open
beagins opened this issue Apr 18, 2017 · 3 comments
Open

TypeError: dgeni-packages/git #218

beagins opened this issue Apr 18, 2017 · 3 comments

Comments

@beagins
Copy link

beagins commented Apr 18, 2017

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
Copy link

Same issue here

@Splaktar
Copy link
Member

You'll get this if

const GITURL_REGEX = /^(?:git\+https|https?):\/\/[^/]+\/([^/]+)\/(.+).git$/;

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
Copy link

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"
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants