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

Property 'issues' does not exist on type 'GitHub' #335

Closed
nwtgck opened this issue Feb 5, 2020 · 3 comments
Closed

Property 'issues' does not exist on type 'GitHub' #335

nwtgck opened this issue Feb 5, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@nwtgck
Copy link
Contributor

nwtgck commented Feb 5, 2020

Describe the bug
Hi,

I had the following build error.

src/main.ts:40:28 - error TS2339: Property 'issues' does not exist on type 'GitHub'.

40         await githubClient.issues.createComment({
                              ~~~~~~


Found 1 error.

image

I use @actions/github@2.1.0. This bug may be a bug of octoki/rest.js.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@nwtgck nwtgck added the bug Something isn't working label Feb 5, 2020
@hardboiled
Copy link

I was having similar issues on this. I found that my type definition file generated as part of the github actions package here:
node_modules/@actions/github/lib/github.d.ts

imports Octokit as a default instead of as a decomposed import:

import { graphql as GraphQL } from '@octokit/graphql/dist-types/types';
import Octokit from '@octokit/rest';
import * as Context from './context';
export declare const context: Context.Context;
export declare class GitHub extends Octokit {

should be:

import { Octokit } from '@octokit/rest';

this breaks compilation for me. When I hand edit the package with this change, my project compiles.

This octokit release seems to be related to this issue.

I ended up nuking all my typescript and just using raw node instead, since I couldn't compile using the types supplied by the @actions/github package.

@nwtgck
Copy link
Contributor Author

nwtgck commented Feb 5, 2020

@hardboiled Thanks! That may relate to my PR: #332.

@thboop
Copy link
Collaborator

thboop commented Feb 21, 2020

@nwtgck this should be resolved in 2.1.1, I've been unable to reproduce in that version.

I'm going to close this out for now, but if you are still encountering issues please let me know and we can revisit this item.

Thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants