Skip to content

Error on example code #11

@Berkmann18

Description

@Berkmann18

When I run

name-your-contributors -u mntnr -r name-your-contributors -t $GITHUB_TOKEN > nyc.json
cat nyc.json | whodidwhat

I get this (same output as name-your-... | whodidwhat):

TypeError: Cannot read property 'map' of undefined
  at cat (/usr/lib/node_modules/whodidwhat/src/index.js:20:20)
  at loopField (/usr/lib/node_modules/whodidwhat/src/index.js:23:30)
  at typeMap.map (/usr/lib/node_modules/whodidwhat/src/index.js:46:27)
  at Array.map (<anonymous>)
  at byUser (/usr/lib/node_modules/whodidwhat/src/index.js:46:11)
  at process._tickCallback (internal/process/next_tick.js:68:7)

I had a quick look at the code but couldn't really understand why that was happening.

To reproduce this, do the following:

npm i -g name-your-contributors whodidwhat
export GITHUB_TOKEN=yourTokenHere
name-your-contributors -u mntnr -r name-your-contributors -t $GITHUB_TOKEN > nyc.json
cat nyc.json | whodidwhat

EDIT: This doesn't happen when using cli.js on a repo clone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions