Skip to content

Fetching pull requests failed: TypeError: Cannot read property 'link' of undefined #32

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

Closed
alexdima opened this issue Jun 26, 2018 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@alexdima
Copy link
Member

alexdima commented Jun 26, 2018

I'm just trying to look at PRs assigned to me, but they don't come up. It is weird, because this worked for me on the mac with an older version of the extension...

image

@rebornix
Copy link
Member

@RMacfarlane this is where we access link https://github.com/Microsoft/vscode-pull-request-github/blob/master/src/github/githubRepository.ts#L36 , is it possible that headers is undefined?

@RMacfarlane RMacfarlane self-assigned this Jun 26, 2018
@RMacfarlane
Copy link
Contributor

RMacfarlane commented Jun 26, 2018

@alexandrudima I think different versions of the @octokit\rest package are being installed based on using npm vs yarn. When using yarn, "^15.2.6" is resolving to that exact version on my machine, and using npm results in 15.8.1 being installed. Between those versions, the property "meta" was renamed to "headers" on the response object. So there should always be a headers property if the request succeeded.

I'll bump the version in the package.json to 15.8.0, the version that introduced the rename

RMacfarlane pushed a commit that referenced this issue Jun 26, 2018
@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Jun 27, 2018
@alexdima
Copy link
Member Author

alexdima commented Jun 27, 2018

Oh yeah, I manually ran yarn on that folder because I had some dugite trouble on Windows. Will try with the new vsix 👍

EDIT: This works fine now, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants