Error Occurs When Following Instructions in development.md
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- node.js, typescript, webpack
- 领域
- build-system, devtools
调研方向
从 development.md 开始,使用 script/bootstrap、npm i 和 npm run build -ws 重现失败。检查 src/context-providers/secrets.ts 第 138 行附近以及 src/workflow/languageServer.ts 第 6 行附近,然后将依赖安装步骤与报告的 TypeScript 错误进行比较。文档中记录的设置能够完成且 workspaces 构建成功,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
Upon following the instructions in the development.md file for creating my own local development environment, after running npm run build -ws it begins building the workspaces and then eventually fails.
The first error that occurs is:
src/context-providers/secrets.ts:138:7 - error TS2769: No overload matches this call.
Overload 1 of 9, '(route: keyof PaginatingEndpoints, parameters: { per_page?: number | undefined; cursor?: string | undefined; redelivery?: boolean | undefined; } | { per_page?: number | undefined; page?: number | undefined; } | ... 219 more ... | ({ ...; } & { ...; }), mapFn: MapFunction<...>): Promise<...>', gave the following error.
Argument of type '{ (params?: (RequestParameters & Omit<ToOctokitParameters<{ parameters: { query?: { per_page?: number | undefined; page?: number | undefined; } | undefined; path: { owner: string; repo: string; }; }; responses: { ...; }; }>, "baseUrl" | ... 1 more ... | "mediaType">) | undefined): Promise<...>; defaults: <O extends ...' is not assignable to parameter of type 'keyof PaginatingEndpoints'.
Overload 2 of 9, '(request: RequestInterface<object>, parameters: string, mapFn: MapFunction<NormalizeResponse<OctokitResponse<any, number>>, StringData[]>): Promise<...>', gave the following error.
Argument of type '{ (params?: (RequestParameters & Omit<ToOctokitParameters<{ parameters: { query?: { per_page?: number | undefined; page?: number | undefined; } | undefined; path: { owner: string; repo: string; }; }; responses: { ...; }; }>, "baseUrl" | ... 1 more ... | "mediaType">) | undefined): Promise<...>; defaults: <O extends ...' is not assignable to parameter of type 'RequestInterface<object>'.
The types of 'defaults(...).defaults(...).endpoint.DEFAULTS' are incompatible between these types.
Type 'object & O & O & import("/Users/nico/vscode/node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types/dist-types/RequestParameters").RequestParameters & { ...; }' is not assignable to type 'object & O & O & import("/Users/nico/vscode/node_modules/@octokit/types/dist-types/RequestParameters").RequestParameters & { baseUrl: string; method: import("/Users/nico/vscode/node_modules/@octokit/types/dist-types/RequestMethod").RequestMethod; url?: string | undefined; headers: import("/Users/nico/vscode/node_mod...'.
Type 'object & O & 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[]'.
138 octokit.actions.listRepoSecrets,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The last messages in my console are:
ERROR in /Users/nico/vscode/vscode-github-actions/src/workflow/languageServer.ts
6:40-73
[tsl] ERROR in /Users/nico/vscode/vscode-github-actions/src/workflow/languageServer.ts(6,41)
TS2307: Cannot find module '@actions/languageserver/request' or its corresponding type declarations.
18 errors have detailed information that is not shown.
Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
webpack 5.97.0 compiled with 18 errors in 5492 ms
npm error Lifecycle script `build` failed with error:
npm error code 1
npm error path /Users/nico/vscode/vscode-github-actions
npm error workspace @github/vscode-github-actions@0.27.0
npm error location /Users/nico/vscode/vscode-github-actions
npm error command failed
npm error command sh -c webpack --mode production
Here is a pastebin of the full console output: https://pastebin.com/mSmvakEM
To Reproduce
Steps to reproduce the behavior (follow instructions in development.md)
mkdir ~/vscode
cd ~/vscode
git clone https://github.com/github/vscode-github-actions.git # Note I used `git clone` instead of `gh repo clone`
cd vscode-github-actions
script/bootstrap
cd ~/vscode
npm i
npm run build -ws
When this threw an error, I followed the instructions further:
If npm run build -ws fails because packages are not installed correctly with npm i, re-run script/bootstrap and run npm ci to get working packages.
cd vscode-github-actions
script/bootstrap
cd ~/vscode
npm install
npm ci
Expected behavior
According to the development.md file, setting up the workspace should just work:
Launching and debugging the extension should just work.
So I should be able to just run these commands, install the necessary packages, and build the necessary workspaces.
Screenshots
Extension Version
According to release-notes.txt the version is 0.25.6
- 主要语言
- TypeScript
- 星标
- 661
- 派生
- 214
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-github-actions 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
github/vscode-github-actions#627 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 20/100
github/vscode-github-actions#630 ·
-
long work 未关闭
难度 4/5 3-5 天 新手友好度 25/100
github/vscode-github-actions#628 ·
-
bug
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-github-actions#625 ·
-
bug
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-github-actions#621 · 3 条评论 ·
查看 github/vscode-github-actions 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
mksglu/context-mode#1200 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
难度 2/5 1-3 小时 新手友好度 75/100
anthropics/claude-code#96687 ·
-
good first issue
难度 1/5 1 小时以内 新手友好度 95/100
AOSSIE-Org/DebateAI#582 · 2 条评论 ·