apptools-lab / AppWorks

🐻 基于 VS Code 插件的前端研发工具集,站点国内镜像:https://apptools.gitee.io
https://appworks.site/
MIT License
995 stars 179 forks source link

执行npm run setup时build阶段npx tsc --build ./tsconfig.json报了大量的@types/vscode/index.d.ts语法错误 #1037

Open impro5 opened 2 years ago

impro5 commented 2 years ago

appworks源码包:

在windows11的环境下,nodejs:v16.14.0,npm版本号:8.3.1

您遇到的问题及复现步骤

执行npm run setup 之后出现大量报错

`node_modules/@types/vscode/index.d.ts:10966:9 - error TS1005: ',' expected.

10966 delete(variable: string): void;


node_modules/@types/vscode/index.d.ts:10971:9 - error TS1005: ',' expected.

10971         clear(): void;

node_modules/@types/vscode/index.d.ts:15782:61 - error TS1005: ',' expected.

15782 export interface TestItemCollection extends Iterable<[id: string, testItem: TestItem]> { ~

node_modules/@types/vscode/index.d.ts:15782:79 - error TS1005: ',' expected.

15782 export interface TestItemCollection extends Iterable<[id: string, testItem: TestItem]> { ~

node_modules/@types/vscode/index.d.ts:15782:89 - error TS1005: ',' expected.

15782 export interface TestItemCollection extends Iterable<[id: string, testItem: TestItem]> { ~

node_modules/@types/vscode/index.d.ts:15782:90 - error TS1109: Expression expected.

15782 export interface TestItemCollection extends Iterable<[id: string, testItem: TestItem]> { ~

node_modules/@types/vscode/index.d.ts:15786:30 - error TS1005: ',' expected.

15786 readonly size: number; ~

node_modules/@types/vscode/index.d.ts:15800:9 - error TS1005: ',' expected.

15800 forEach(callback: (item: TestItem, collection: TestItemCollection) => unknown, thisArg?: any): void;


node_modules/@types/vscode/index.d.ts:15807:9 - error TS1005: ',' expected.

15807         add(item: TestItem): void;

node_modules/@types/vscode/index.d.ts:15813:9 - error TS1005: ',' expected.

15813 delete(itemId: string): void;


node_modules/@types/vscode/index.d.ts:15820:9 - error TS1005: ',' expected.

15820         get(itemId: string): TestItem | undefined;

node_modules/@types/vscode/index.d.ts:16241:1 - error TS1128: Declaration or statement expected.

16241 } ~

Found 782 errors.

Trace: Error: Command failed with exit code 1: npx tsc --build ./tsconfig.json at makeError (F:\newgitsource\cfeWrench\node_modules\execa\lib\error.js:60:11) at handlePromise (F:\newgitsource\cfeWrench\node_modules\execa\index.js:118:26) at processTicksAndRejections (node:internal/process/task_queues:96:5) { shortMessage: 'Command failed with exit code 1: npx tsc --build ./tsconfig.json', command: 'npx tsc --build ./tsconfig.json', escapedCommand: 'npx tsc --build "./tsconfig.json"', exitCode: 1, signal: undefined, signalDescription: undefined, stdout: undefined, stderr: undefined, failed: true, timedOut: false, isCanceled: false, killed: false } at F:\newgitsource\cfeWrench\scripts\build.ts:45:11 at processTicksAndRejections (node:internal/process/task_queues:96:5)`

您期待的正确结果

希望通过npm run setup能正常使用,同时希望能支持windows开发环境