APIDevTools / swagger-parser

Swagger 2.0 and OpenAPI 3.0 parser/validator
https://apitools.dev/swagger-parser
MIT License
1.1k stars 155 forks source link

BUG:the “lib/index.d.ts” make vscode :[error] [vscode.typescript-language-features] provider FAILED #148

Open CandyCloudCC opened 4 years ago

CandyCloudCC commented 4 years ago

VSCode vsersion:1.47.0 swagger-parser version:10.0.0

The output message:

[2020-07-14 18:23:07.596] [exthost] [error] [vscode.typescript-language-features] provider FAILED
[2020-07-14 18:23:07.597] [exthost] [error] Error: <semantic> TypeScript Server Error (3.9.6)
Debug Failure.
Error: Debug Failure.
    at Object.getNameForExportedSymbol (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:110421:70)
    at pushSymbol (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:113404:40)
    at /home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:113387:28
    at Map.forEach (<anonymous>)
    at getSymbolsFromOtherSourceFileExports (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:113385:54)
    at getGlobalCompletions (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:113144:49)
    at tryGetGlobalSymbols (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:113055:25)
    at getCompletionData (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:112849:22)
    at Object.getCompletionsAtPosition (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:112193:34)
    at Proxy.getCompletionsAtPosition (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:138897:35)
    at /home/tang/.vscode-server/extensions/visualstudioexptteam.vscodeintellicode-1.2.9/node_modules/@vsintellicode/typescript-intellicode-plugin/lib/index.js:2:2281
    at Object.r.getCompletionsAtPosition (/home/tang/.vscode-server/extensions/visualstudioexptteam.vscodeintellicode-1.2.9/node_modules/@vsintellicode/typescript-intellicode-plugin/lib/index.js:2:6454)
    at IOSession.Session.getCompletions (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:148976:64)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:147913:61)
    at /home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:149553:88
    at IOSession.Session.executeWithRequestId (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:149544:28)
    at IOSession.Session.executeCommand (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:149553:33)
    at IOSession.Session.onMessage (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:149577:35)
    at Interface.<anonymous> (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/node_modules/typescript/lib/tsserver.js:150893:27)
    at Interface.emit (events.js:200:13)
    at Interface._onLine (readline.js:314:10)
    at Interface._normalWrite (readline.js:459:12)
    at Socket.ondata (readline.js:170:10)
    at Socket.emit (events.js:200:13)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
    at Function.create (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/typescript-language-features/dist/extension.js:1:55099)
    at h.dispatchResponse (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/typescript-language-features/dist/extension.js:1:227715)
    at h.dispatchMessage (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/typescript-language-features/dist/extension.js:1:226635)
    at /home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/typescript-language-features/dist/extension.js:1:226111
    at l.fire (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/out/vs/server/remoteExtensionHostProcess.js:45:801)
    at l.onLengthData (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/typescript-language-features/dist/extension.js:1:235431)
    at Socket.<anonymous> (/home/tang/.vscode-server/bin/d5e9aa0227e057a60c82568bf31c04730dc15dcd/extensions/typescript-language-features/dist/extension.js:1:235079)
    at Socket.emit (events.js:200:13)
    at Socket.EventEmitter.emit (domain.js:471:20)
    at addChunk (_stream_readable.js:294:12)
    at readableAddChunk (_stream_readable.js:275:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
jurijzahn8019 commented 4 years ago

This fixed the issue in my project

npm un swagger-parser
npm i @apidevtools/swagger-parser 
import { bundle } from "@apidevtools/swagger-parser";