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

Can't build the repo locally #518

Open
@plaidbait91

Description

@plaidbait91

On running npm run build, I'm getting the following error:

src/octokit.ts:8:50 - error TS2345: Argument of type 'typeof throttling' is not assignable to parameter of type 'OctokitPlugin'.
  Types of parameters 'octokit' and 'octokit' are incompatible.
    Type 'import("/home/coder/devrev-codejam/lynch-bot/node_modules/@octokit/action/node_modules/@octokit/core/dist-types/index").Octokit' is not assignable to type 'import("/home/coder/devrev-codejam/lynch-bot/node_modules/@octokit/core/dist-types/index").Octokit'.
      The types of 'request.defaults(...).endpoint.DEFAULTS' are incompatible between these types.
        Type 'object & O & import("/home/coder/devrev-codejam/lynch-bot/node_modules/@octokit/action/node_modules/@octokit/types/dist-types/RequestParameters").RequestParameters & { ...; }' is not assignable to type 'object & O & import("/home/coder/devrev-codejam/lynch-bot/node_modules/@octokit/types/dist-types/RequestParameters").RequestParameters & { baseUrl: string; method: import("/home/coder/devrev-codejam/lynch-bot/node_modules/@octokit/types/dist-types/RequestMethod").RequestMethod; url?: string | undefined; headers: imp...'.
          Type 'object & O & RequestParameters & { baseUrl: string; method: RequestMethod; url?: string | undefined; headers: RequestHeaders & { ...; }; mediaType: { ...; }; }' is not assignable to type '{ baseUrl: string; method: RequestMethod; url?: string | undefined; headers: RequestHeaders & { accept: string; "user-agent": string; }; mediaType: { format: string; previews: string[]; }; }'.
            The types of 'mediaType.previews' are incompatible between these types.
              Type 'string[] | undefined' is not assignable to type 'string[]'.
                Type 'undefined' is not assignable to type 'string[]'.

8 const RetryAndThrottlingOctokit = Octokit.plugin(throttling, retry)

This error occurs in octokit.ts where the plugins are provided to the octokit instance. Replacing the octokit instance from @octokit/action with the instance from @octokit/core resolves the issue in this file, but is incompatible with every other file which is expecting an action instance. How have you resolved this?

@harjotgill @guritfaq

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