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

Module '@octokit/types/dist-types' has no exported member 'IssuesListForRepoResponseData' #89

Closed
ghost opened this issue Jan 22, 2021 · 5 comments · Fixed by #123
Closed

Comments

@ghost
Copy link

ghost commented Jan 22, 2021

The process fails with the latest @octokit/rest version:

\node_modules\ts-node\src\index.ts:434
    return new TSError(diagnosticText, diagnosticCodes)
           ^
TSError: ⨯ Unable to compile TypeScript:
src/githubHelper.ts:5:10 - error TS2305: Module '"../node_modules/@octokit/types/dist-types"' has no exported member 'IssuesListForRepoResponseData'.

5 import { IssuesListForRepoResponseData, PullsListResponseData } from "@octokit/types";
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/githubHelper.ts:5:41 - error TS2305: Module '"../node_modules/@octokit/types/dist-types"' has no exported member 'PullsListResponseData'.

5 import { IssuesListForRepoResponseData, PullsListResponseData } from "@octokit/types";
                                          ~~~~~~~~~~~~~~~~~~~~~

I manually installed @octokit/[email protected] (minimum version required by this package), and got it working.

@ghost ghost changed the title Module '"../node_modules/@octokit/types/dist-types"' has no exported member 'IssuesListForRepoResponseData' Module '@octokit/types/dist-types' has no exported member 'IssuesListForRepoResponseData' Jan 22, 2021
@ghost
Copy link
Author

ghost commented Jan 22, 2021

Seems to work with @octokit/[email protected] as well.

@ghost
Copy link
Author

ghost commented Feb 1, 2021

Maybe this was an issue in my setup somehow. The file package-lock.json seems to have the correct versions in place. I ran npm update after pulling, and for some reason it did not respect the lock file versions.

@spruce
Copy link
Member

spruce commented Feb 1, 2021

That seems to be a problem with the @octokit/types and not node-gitlab-2-github. Correct me if I'm wrong. But then I'd close this issue as it is nothing we can fix here.

@ghost ghost closed this as completed Feb 7, 2021
@lookfirst
Copy link

image

I'm getting this now.

fyi also package-lock.json is checked into the repo, even though it is in the .gitignore, so that is what is confusing things.

remove that file and install things and master doesn't compile...

@threepistons
Copy link

threepistons commented May 7, 2021

I was getting the same output that @ererkka was getting. What worked for me was, after cloning this repo, saying npm install then npm install @octokit/[email protected] then npm install @octokit/[email protected].

I cloned https://github.com/octokit/types.ts and had a look. The IssuesListForRepoResponseData artifact (I don't know TypeScript so I don't know what kind of artifact it is) has gone from the Endpoints.ts file between v5.5.0 and the next release v6.0.0, as shown below; the PullsListResponseData artifact is likewise gone. This change is not visible using Github's web diff viewer because the Endpoints.ts file diff is too big.

I suspect that @octokit have dropped these artifacts in a way that isn't explicit in the changelog mention of octokit/types.ts#197. The change is implied in the modification to scripts/update-endpoints/typescript.js (which generates Endpoints.ts) mentioned in octokit/types.ts#161.

-> % git checkout v6.0.0
Note: checking out 'v6.0.0'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at ad9c85d feat: use @octokit/openapi (#197)

-> % grep -rn -C3 IssuesListForRepoResponseData *

-> % git checkout v5.5.0                         
Previous HEAD position was ad9c85d feat: use @octokit/openapi (#197)
HEAD is now at 57d95ef feat: new code scanning endpoints. Add types for deprecated paths (#165)

-> % grep -rn -C3 IssuesListForRepoResponseData *
src/generated/Endpoints.ts-2610-  "GET /repos/:owner/:repo/issues": {
src/generated/Endpoints.ts-2611-    parameters: IssuesListForRepoEndpoint;
src/generated/Endpoints.ts-2612-    request: IssuesListForRepoRequestOptions;
src/generated/Endpoints.ts:2613:    response: OctokitResponse<IssuesListForRepoResponseData>;
src/generated/Endpoints.ts-2614-  };
src/generated/Endpoints.ts-2615-  /**
src/generated/Endpoints.ts-2616-   * @see https://developer.github.com/v3/issues/#get-an-issue
--
src/generated/Endpoints.ts-18350-  request: RequestRequestOptions;
src/generated/Endpoints.ts-18351-};
src/generated/Endpoints.ts-18352-
src/generated/Endpoints.ts:18353:export type IssuesListForRepoResponseData = {
src/generated/Endpoints.ts-18354-  id: number;
src/generated/Endpoints.ts-18355-  node_id: string;
src/generated/Endpoints.ts-18356-  url: string;

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants