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

[BUG]: Typescript 5.4.3 reports Property 'POST /repos/{owner}/{repo}/pages/deployment' does not exist on type 'Endpoints' #626

Closed
1 task done
jozefizso opened this issue Apr 2, 2024 · 4 comments
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented, or is being fixed

Comments

@jozefizso
Copy link

jozefizso commented Apr 2, 2024

What happened?

We upgraded the typescript from ^5.3.3 to ^5.4.3. When compiling the project, we get this error: error TS2339: Property 'POST /repos/{owner}/{repo}/pages/deployment' does not exist on type 'Endpoints'.

Versions

Node v18.19.0
Typescript v5.4.3

"@octokit/types": "^13.0.0"
"@octokit/webhooks": "^13.1.1"
"@octokit/webhooks-types": "^7.4.0"

Relevant log output

> tsc

node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:2527:55 - error TS2339: Property 'POST /repos/{owner}/{repo}/pages/deployment' does not exist on type 'Endpoints'.

2527             parameters: RequestParameters & Endpoints["POST /repos/{owner}/{repo}/pages/deployment"]["parameters"];
                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:2528:33 - error TS2339: Property 'POST /repos/{owner}/{repo}/pages/deployment' does not exist on type 'Endpoints'.

2528             response: Endpoints["POST /repos/{owner}/{repo}/pages/deployment"]["response"];
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 2 errors in the same file, starting at: node_modules/@octokit/plugin-rest-endpoint-methods/dist-types/generated/parameters-and-response-types.d.ts:2527

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jozefizso jozefizso added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented, or is being fixed labels Apr 2, 2024
Copy link
Contributor

github-actions bot commented Apr 2, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339
Copy link
Member

That error usually suggests a mismatch of versions of @octokit/types and @octokit/openapi-types in your node_modules

@wolfy1339
Copy link
Member

Also, fyi you don't need @octokit/webhooks-types for v13 of @octokit/webhooks, instead you want @octokit/openapi-webhooks-types

There isn't a 1:1 migration unfortunately, as the types are completely different.
The types aren't exported at the root for each event payload, which means you'll have to use a utility type in order to facilitate access
https://github.com/octokit/webhooks.js/blob/main/src/types.ts#L15-L16

@wolfy1339
Copy link
Member

I have been going through all packages and updating them to use @octokit/types v13 which should resolve this.

Simply upgrade every Octokit package to their latest minor version, and things should work

@github-project-automation github-project-automation bot moved this from 🆕 Triage to ✅ Done in 🧰 Octokit Active Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented, or is being fixed
Projects
Archived in project
Development

No branches or pull requests

2 participants