jakeleboeuf / contributor

A simple Node.js module to add git contributors to your package.json.
http://npmjs.org/package/contributor
20 stars 4 forks source link

Crashing #4

Closed bencevans closed 10 years ago

bencevans commented 10 years ago
/home/bencevans/.nvm/v0.10.27/lib/node_modules/contributor/lib/contributor.js:19
    contribApi = pack.repository.url.split('/');
                                     ^
TypeError: Cannot call method 'split' of undefined
    at Object.<anonymous> (/home/bencevans/.nvm/v0.10.27/lib/node_modules/contributor/lib/contributor.js:19:38)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/bencevans/.nvm/v0.10.27/lib/node_modules/contributor/bin/contributor:2:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
jakeleboeuf commented 10 years ago

Hey Ben,

Do you have a repository listed in your package.json? I'll procvide a promt to input that info in the next build of it's missing, but for now- just make sure your losing your GitHub repository in your package.json and that should solve your problem!

jakeleboeuf commented 10 years ago

@bencevans, Let me know if that doesn't fix things for you.

bencevans commented 10 years ago

That has fixed it to a point however I do have a repository element in the package.json file with the value git://github.com/fluent-ffmpeg/node-fluent-ffmpeg.git

jakeleboeuf commented 10 years ago

Hey Ben,

Please make sure to follow the npm specs for your package.json and the problem should resolve.

This should do the trick:

"repository" : { 
    "type" : "git",
    "url" : "http://github.com/fluent-ffmpeg/node-fluent-ffmpeg.git"
}
bencevans commented 10 years ago

@jakeleboeuf taa!

bencevans commented 10 years ago

Just an idea that might be quite jazzy, instead of using the GitHub API, to use the local GIT data?