Skip to content
This repository was archived by the owner on Dec 3, 2024. It is now read-only.

TypeError: Cannot read property 'split' of undefined #66

Merged
merged 3 commits into from
Mar 18, 2017

Conversation

himynameisdave
Copy link
Owner

I've previously run git-labelmaker and it worked just fine but when I ran it today I needed to use a new token since I forgot my password. After I entered the new token and a master password I got the error [TypeError: Cannot read property 'split' of undefined]. I uninstalled and reinstalled git-labelmaker and it didn't fix the issue. I tried diving into the source to see what might be happening here but I'm honestly not too sure...

node version: 5.11.1
npm version: 3.9.5

Any thoughts?

@dwoodiwiss
Copy link

dwoodiwiss commented Jul 28, 2016

My guess would be that the repos URL format is possibly causing the issue.
The split error is most likely coming from here.

Some GitHub URLs contain : which might not be getting picked up by this package - which is used in this project.

@himynameisdave
Copy link
Owner

himynameisdave commented Jul 28, 2016

@dwoodiwiss thanks for looking into this, I think you may be correct in which case I will file & fix it in node-github-url-from-git.

@marcusmoore do you know what github repo (or better the github url) you were experiencing the issue with?

@marcusmoore
Copy link
Author

Thanks for looking into this. I went back and looked at my dev log for the day and here's my notes:

touch labels.json
sublime labels.json

# paste in labels and save
# forgot my master password...
# deleted old token from here: https://github.com/settings/tokens
# generated new token with repo access...
git-labelmaker
# Chose to create new token
# Got error `[TypeError: Cannot read property 'split' of undefined]`...

# remove git-labelmaker
npm uninstall -g git-labelmaker

# and install again...
npm i -g git-labelmaker

# enter access token and master password and got error again...

The remote repo that I was intending to add labels to had a - in the url though. I'm not sure if that could be the issue?

@pmahnke
Copy link

pmahnke commented Sep 8, 2016

I have this same issue with a repo with a dash '-' in the name as well...

@koobitor
Copy link

I try to change remote form ssh to https.

screen shot 2559-09-12 at 11 20 10 pm

@himynameisdave
Copy link
Owner

I've added some proper error handling, and as far as I can tell the node-github-url-from-git package handles all of the standard github urls. If there are anymore issues/if you are not seeing meaningful errors, let me know and we can re-investigate.

Otherwise feel free to submit tickets to node-github-url-from-git with your specific test cases/git urls that are failing 👍

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

Successfully merging this pull request may close these issues.

5 participants