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

Can't build the repo locally #518

Open
plaidbait91 opened this issue Feb 10, 2024 · 0 comments
Open

Can't build the repo locally #518

plaidbait91 opened this issue Feb 10, 2024 · 0 comments

Comments

@plaidbait91
Copy link

plaidbait91 commented Feb 10, 2024

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

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

No branches or pull requests

1 participant