Comments (12)
Yep! I have just released updates to several Octokit packages. Can you tell me the versions of all of your Octokit-related packages in your lock file?
from plugin-rest-endpoint-methods.js.
Can you please share your tsconfig.json
as well? Also, can you share a snippet of code that reproduces the problem?
from plugin-rest-endpoint-methods.js.
Could you also check what version of @octokit/plugin-rest-endpoint-methods
is in node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods
by checking node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/package.json
? Judging by the error, I think it isn't the current version (v5.15.0).
from plugin-rest-endpoint-methods.js.
Could you also check what version of @octokit/plugin-rest-endpoint-methods
Yes, seems like, do you have an idea how to fix it?
$ cat node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/package.json | grep \"version\":
"version": "5.13.0"
from plugin-rest-endpoint-methods.js.
Could you also check what version of @octokit/plugin-rest-endpoint-methods
Yes, seems like, do you have an idea how to fix it?
$ cat node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/package.json | grep \"version\": "version": "5.13.0"
Interesting! I wonder if we need to update the dependency defined on @octokit/rest
. The links between all of these packages are pretty tricky to understand.
@gr2m Can you point us in the right direction?
from plugin-rest-endpoint-methods.js.
Can you please share your tsconfig.json as well? Also, can you share a snippet of code that reproduces the problem?
tsconfig.json
{
"compilerOptions": {
"target": "es2019",
"module": "commonjs",
"outDir": "./lib",
"rootDir": "./src",
"strict": true,
"noImplicitAny": true,
"esModuleInterop": true,
"strictPropertyInitialization": false
},
"exclude": ["node_modules"]
}
About the snippet - there is nothing special, basically if I import
import { RestEndpointMethodTypes } from "@octokit/plugin-rest-endpoint-methods"
problem starts to appear.
In my case I just do this
export type CreatePullRequestParameters =
RestEndpointMethodTypes["pulls"]["create"]["parameters"]
from plugin-rest-endpoint-methods.js.
The POST /repos/{owner}/{repo}/content_references/{content_reference_id}/attachments
endpoint has been removed, it no longer exists. This is an edge case, it happens very rarely. You likely have the latest version of @octokit/openapi-types
, but not the latest version of @octokit/plugin-rest-endpoint-methods
.
Try to delete the node_modules
folder and whatever lock file you use (usually package-lock.json
). Then run npm install
again, that should fix it
from plugin-rest-endpoint-methods.js.
TypeScript uses the latest version of @octokit/rest
., today I noticed that the CI build failed due to the following errors
Error: node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts(903,48): error TS2344: Type '"/orgs/{org_id}/codespaces"' does not satisfy the constraint 'keyof paths'.
Error: node_modules/@octokit/types/dist-types/generated/Endpoints.d.ts(1612,70): error TS2344: Type '"/repos/{owner}/{repo}/community/code_of_conduct"' does not satisfy the constraint 'keyof paths'.
Error: node_modules/@octokit/plugin-paginate-rest/dist-types/generated/paginating-endpoints.d.ts(226,74): error TS2339: Property 'data' does not exist on type 'unknown'.
I'm not sure if this is related to this issue or should I create a new one?
from plugin-rest-endpoint-methods.js.
@a-tarasyuk Can you try updating all of the Octokit packages? I think you'll find this is fixed now.
from plugin-rest-endpoint-methods.js.
It uses the latest version. Has it been updated recently?
"@octokit/rest": "latest",
from plugin-rest-endpoint-methods.js.
@timrogers Thanks. The latest version seems to work fine.
from plugin-rest-endpoint-methods.js.
Great - sorry about that! The packages have complicated dependencies and some of them still needed updates.
from plugin-rest-endpoint-methods.js.
Related Issues (20)
- Incorrect type for setLabels HOT 2
- build is failing on latest release HOT 1
- Very big misunderstanding /NOT ME!
- How to update some of the endpoints HOT 1
- Hello
- CodeQL Check Run requires write access when running for 'push' events HOT 1
- Remove unnecessary step for CodeQL workflow HOT 1
- no
- Remove Node version 10 from .github/workflows/test.yml
- Suspend a users on GHES? HOT 5
- [BUG]: [Create Review] 422: Unprocessable Entity: Review comments is invalid and Review threads is invalid HOT 2
- [BUG]: `position` marked necessary in `createReview` while it's not HOT 2
- [BUG]: No way to add new methods to octokit.rest.repos in v7 HOT 6
- [BUG]: Upgrading from `@actions/github` V5 -> V6 caused TypeErrors within `getOcktokit()` HOT 6
- [BUG]: createOrUpdateFileContents results in error 504 HOT 4
- [BUG]: Peer dependency of @octokit/core@">=5" broken as @octokit/core@6 is ESM HOT 2
- export dist-src/generated/endpoints.js? HOT 4
- [BUG]: Property 'POST /repos/{owner}/{repo}/pages/deployment' does not exist on type 'Endpoints'. HOT 3
- [BUG]: CommonJS `require()` is broken. HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plugin-rest-endpoint-methods.js.