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: Cannot read property 'color' of undefined #23

Closed
JustinBeckwith opened this issue Mar 6, 2018 · 3 comments
Closed

TypeError: Cannot read property 'color' of undefined #23

JustinBeckwith opened this issue Mar 6, 2018 · 3 comments

Comments

@JustinBeckwith
Copy link

Greetings! Was trying to run this, and it threw a runtime error at me :(

$ github-stats -u JustinBeckwith
info  Fetching data...
/Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh-polyglot/lib/index.js:122
                color: GitHubColors.get(cLang).color
                                              ^

TypeError: Cannot read property 'color' of undefined
    at /Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh-polyglot/lib/index.js:122:47
    at Array.map (native)
    at /Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh-polyglot/lib/index.js:118:42
    at /Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh-polyglot/lib/index.js:55:9
    at /Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh.js/lib/index.js:170:28
    at GitHub.checkResponse (/Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh.js/lib/index.js:122:42)
    at /Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/gh.js/lib/index.js:88:18
    at /Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/jsonrequest/lib/index.js:57:9
    at opt_callback (/Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/tinyreq/lib/index.js:53:9)
    at IncomingMessage.<anonymous> (/Users/beckwith/.nvm/versions/node/v6.10.3/lib/node_modules/github-stats/node_modules/tinyreq/lib/index.js:85:13)

Good luck!

@IonicaBizau
Copy link
Owner

TL;DR You have many languages. 😁
http://ionicabizau.github.io/github-profile-languages/?user=JustinBeckwith

The problem seems to come from gh-polyglot. Related: IonicaBizau/github-colors#26

IonicaBizau added a commit that referenced this issue Mar 6, 2018
@IonicaBizau
Copy link
Owner

Fixed in IonicaBizau/node-gh-polyglot#15

You will need to npm i github-stats@latest.
Updated the other dependencies too (fixes the legend on macOS).

@JustinBeckwith
Copy link
Author

Much better! Thank you so much for the snappy response.

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

2 participants