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

LSP crashes when used in a mixed node + Deno project #199

Closed
lucacasonato opened this issue Sep 10, 2020 · 2 comments
Closed

LSP crashes when used in a mixed node + Deno project #199

lucacasonato opened this issue Sep 10, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@lucacasonato
Copy link
Member

The LSP crashes for me when I try to use this in a mixed Node and Deno project (https://github.com/denoland/doc_website) with this settings.json file:

{
  "deno.enable": true,
  "deno.unstable": true,
  "deno.include": ["api/docs.ts"]
}
Extension host error:
rejected promise not handled within 1 second: Error: <semantic> TypeScript Server Error (3.9.7)
Debug Failure. False expression.
Error: Debug Failure. False expression.
    at watchFailedLookupLocationsOfExternalModuleResolutions (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104288:26)
    at resolveNamesWithLocalCache (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104152:21)
    at Object.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104193:20)
    at ConfiguredProject.Project.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:142863:45)
    at ConfiguredProject.languageServiceHost.resolveTypeReferenceDirectives (/mnt/f9/Projects/github.com/denoland/vscode_deno/typescript-deno-plugin/out/typescript-deno-plugin/src/plugin.js:197:38)
    at Object.compilerHost.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138740:64)
    at actualResolveTypeReferenceDirectiveNamesWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:99934:143)
    at resolveTypeReferenceDirectiveNamesWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100142:26)
    at processTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101596:31)
    at findSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101434:21)
    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:85
    at getSourceFileFromReferenceWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101236:34)
    at processSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:13)
    at processTypeReferenceDirective (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101648:25)
    at processTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101603:17)
    at findSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101434:21)
    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:85
    at getSourceFileFromReferenceWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101236:34)
    at processSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:13)
    at processRootFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101092:13)
    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100016:60
    at Object.forEach (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:167:30)
    at Object.createProgram (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100016:16)
    at synchronizeHostData (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138755:26)
    at Proxy.getProgram (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138847:13)
    at ConfiguredProject.Project.updateGraphWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:143339:53)
    at ConfiguredProject.Project.updateGraph (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:143282:42)
    at ConfiguredProject.updateGraph (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:144076:63)
    at ProjectService.createLoadAndUpdateConfiguredProject (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:145729:25)
    at ProjectService.assignProjectToOpenedScriptInfo (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146610:44)
    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146929:97
    at Object.flatMap (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:465:25)
    at ProjectService.applyChangesInOpenFiles (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146929:41)
    at Session.handlers.ts.createMapFromTemplate._a.<computed> (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:147792:46)
    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149555:88
    at IOSession.Session.executeWithRequestId (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149546:28)
    at IOSession.Session.executeCommand (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149555:33)
    at IOSession.Session.onMessage (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149579:35)
    at Interface.<anonymous> (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:150895:27)
    at Interface.emit (events.js:203:13)
    at Interface._onLine (readline.js:316:10)
    at Interface._normalWrite (readline.js:461:12)
    at Socket.ondata (readline.js:172:10)
    at Socket.emit (events.js:203:13)
    at addChunk (_stream_readable.js:295:12)
    at readableAddChunk (_stream_readable.js:276:11)
    at Socket.Readable.push (_stream_readable.js:210:10)
    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
My ts server log
Info 0    [11:27:28.126] Starting TS Server
Info 1    [11:27:28.127] Version: 3.9.7
Info 2    [11:27:28.127] Arguments: /snap/code/42/usr/share/code/code /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /tmp/vscode-typescript1000/be42c56b73ca0b45136c/tscancellation-c4c2d9d75c1152784b46.tmp* --logVerbosity verbose --logFile /home/lucacasonato/.config/Code/logs/20200909T111954/exthost3/vscode.typescript-language-features/tsserver-log-AGPvQK/tsserver.log --globalPlugins typescript-vscode-sh-plugin,typescript-deno-plugin --pluginProbeLocations /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features,/mnt/f9/Projects/github.com/denoland/vscode_deno --locale en --noGetErrOnBackgroundUpdate --validateDefaultNpmLocation
Info 3    [11:27:28.127] Platform: linux NodeVersion: 12 CaseSensitive: true
Info 4    [11:27:28.128] Binding...
Info 5    [11:27:28.132] request:
    {"seq":0,"type":"request","command":"configure","arguments":{"hostInfo":"vscode","preferences":{"providePrefixAndSuffixTextForRename":true,"allowRenameOfImportPath":true,"includePackageJsonAutoImports":"auto"},"watchOptions":{}}}
Info 6    [11:27:28.132] Host information vscode
Info 7    [11:27:28.132] Host watch options changed to undefined, it will be take effect for next watches.
Info 8    [11:27:28.133] response:
    {"seq":0,"type":"response","command":"configure","request_seq":0,"success":true}
Perf 9    [11:27:28.133] 0::configure: async elapsed time (in milliseconds) 0.7755
Info 10   [11:27:28.133] request:
    {"seq":1,"type":"request","command":"compilerOptionsForInferredProjects","arguments":{"options":{"module":"commonjs","target":"es2016","jsx":"preserve","sourceMap":true,"allowJs":true,"allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"resolveJsonModule":true}}}
Info 11   [11:27:28.133] Scheduled: *ensureProjectForOpenFiles*
Perf 12   [11:27:28.133] 1::compilerOptionsForInferredProjects: elapsed time (in milliseconds) 0.4053
Info 13   [11:27:28.133] response:
    {"seq":0,"type":"response","command":"compilerOptionsForInferredProjects","request_seq":1,"success":true,"body":true}
Info 14   [11:27:28.133] request:
    {"seq":2,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"/mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts","fileContent":"// Copyright 2020 the Deno authors. All rights reserved. MIT license.\n\nimport {\n  APIGatewayProxyEvent,\n  APIGatewayProxyResult,\n  Context,\n} from \"https://deno.land/x/lambda@1.2.1/mod.ts\";\n\nconst decoder = new TextDecoder();\n\nexport async function handler(\n  event: APIGatewayProxyEvent,\n  context: Context\n): Promise<APIGatewayProxyResult> {\n  const url = new URL(\n    JSON.parse(event.body || '{ \"path\": \"\" }').path,\n    \"https://example.com\"\n  );\n\n  const entrypoint = url.searchParams.get(\"entrypoint\");\n\n  if (!entrypoint) {\n    return {\n      statusCode: 400,\n      body: JSON.stringify({\n        error: \"missing entrypoint query parameter\",\n      }),\n      headers: {\n        \"content-type\": \"application/json; charset=utf-8\",\n      },\n    };\n  }\n\n  const isRemote = entrypoint.startsWith(\"https://\");\n\n  let sourceFile: string;\n  if (isRemote) {\n    sourceFile = entrypoint;\n  } else {\n    return error(\"entrypoint must be a remote https:// module\", 400);\n  }\n\n  const proc = Deno.run({\n    cmd: [\"deno\", \"doc\", sourceFile, \"--json\", \"--reload\"],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  let killed = false;\n\n  // Zeit timeout is 10 seconds for free tier: https://zeit.co/docs/v2/platform/limits\n  const timer = setTimeout(() => {\n    killed = true;\n    proc.kill(Deno.Signal.SIGKILL);\n  }, 9000);\n\n  const [out, errOut] = await Promise.all([\n    proc.output(),\n    proc.stderrOutput(),\n  ]);\n  const status = await proc.status();\n  clearTimeout(timer);\n  proc.close();\n  if (!status.success) {\n    if (killed) return error(\"timed out\", 500);\n    return error(decoder.decode(errOut), 500);\n  }\n\n  return {\n    statusCode: 200,\n    body: JSON.stringify({\n      timestamp: new Date().toISOString(),\n      nodes: JSON.parse(decoder.decode(out)),\n    }),\n    headers: {\n      \"content-type\": \"application/json; charset=utf-8\",\n    },\n  };\n}\n\nfunction error(message: string, code: number) {\n  return {\n    statusCode: code,\n    body: JSON.stringify({\n      error: message,\n    }),\n    headers: {\n      \"content-type\": \"application/json; charset=utf-8\",\n    },\n  };\n}\n","projectRootPath":"/mnt/f9/Projects/github.com/denoland/doc_website","scriptKindName":"TS"}]}}
Info 15   [11:27:28.134] Search path: /mnt/f9/Projects/github.com/denoland/doc_website/api
Info 16   [11:27:28.135] ConfigFilePresence:: Current Watches: :: File: /mnt/f9/Projects/github.com/denoland/doc_website/api/tsconfig.json Currently impacted open files: RootsOfInferredProjects:  OtherOpenFiles: /mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts Status: File added to open files impacted by this config file
Info 17   [11:27:28.135] ConfigFilePresence:: Current Watches: :: File: /mnt/f9/Projects/github.com/denoland/doc_website/api/jsconfig.json Currently impacted open files: RootsOfInferredProjects:  OtherOpenFiles: /mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts Status: File added to open files impacted by this config file
Info 18   [11:27:28.135] ConfigFilePresence:: Current Watches: :: File: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json Currently impacted open files: RootsOfInferredProjects:  OtherOpenFiles: /mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts Status: File added to open files impacted by this config file
Info 19   [11:27:28.135] For info: /mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts :: Config file name: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json
Info 20   [11:27:28.135] Opened configuration file /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json
Info 21   [11:27:28.136] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json 2000 undefined Project: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json WatchType: Config file
Info 22   [11:27:28.137] event:
    {"seq":0,"type":"event","event":"projectLoadingStart","body":{"projectName":"/mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json","reason":"Creating possible configured project for /mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts to open"}}
Info 23   [11:27:28.155] Config: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json : {
 "rootNames": [
  "/mnt/f9/Projects/github.com/denoland/doc_website/next-env.d.ts",
  "/mnt/f9/Projects/github.com/denoland/doc_website/util/data.ts",
  "/mnt/f9/Projects/github.com/denoland/doc_website/util/docs.ts",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Class.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Documentation.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Enum.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Footer.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Function.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Header.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Interface.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/JSDoc.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Loading.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Namespace.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Sidebar.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/SinglePage.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Transition.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/TsType.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/TypeAlias.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Variable.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/components/Wrapper.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/404.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/_app.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/_document.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/about.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/index.tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/builtin/[version].tsx",
  "/mnt/f9/Projects/github.com/denoland/doc_website/pages/https/[...url].tsx"
 ],
 "options": {
  "target": 1,
  "lib": [
   "lib.dom.d.ts",
   "lib.dom.iterable.d.ts",
   "lib.esnext.d.ts"
  ],
  "allowJs": true,
  "skipLibCheck": true,
  "strict": true,
  "forceConsistentCasingInFileNames": true,
  "noEmit": true,
  "esModuleInterop": true,
  "module": 99,
  "moduleResolution": 2,
  "resolveJsonModule": true,
  "isolatedModules": true,
  "jsx": 1,
  "configFilePath": "/mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json"
 }
}
Info 24   [11:27:28.155] DirectoryWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website 1 undefined Project: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json WatchType: Wild card directory
Info 25   [11:27:29.32] Elapsed:: 877ms DirectoryWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website 1 undefined Project: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json WatchType: Wild card directory
Info 26   [11:27:29.32] Loading global plugin typescript-vscode-sh-plugin
Info 27   [11:27:29.32] Enabling plugin typescript-vscode-sh-plugin from candidate paths: /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features,/mnt/f9/Projects/github.com/denoland/vscode_deno,/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js/../../..
Info 28   [11:27:29.32] Loading typescript-vscode-sh-plugin from /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features (resolved to /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features/node_modules)
Info 29   [11:27:29.35] typescript-vscode-sh-plugin initialized. Intercepting getEncodedSemanticClassifications and getEncodedSyntacticClassifications.
Info 30   [11:27:29.35] Plugin validation succeded
Info 31   [11:27:29.35] Loading global plugin typescript-deno-plugin
Info 32   [11:27:29.35] Enabling plugin typescript-deno-plugin from candidate paths: /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features,/mnt/f9/Projects/github.com/denoland/vscode_deno,/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js/../../..
Info 33   [11:27:29.35] Loading typescript-deno-plugin from /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features (resolved to /snap/code/42/usr/share/code/resources/app/extensions/typescript-language-features/node_modules)
Info 34   [11:27:29.46] Loading typescript-deno-plugin from /mnt/f9/Projects/github.com/denoland/vscode_deno (resolved to /mnt/f9/Projects/github.com/denoland/vscode_deno/node_modules)
Info 35   [11:27:29.92] [typescript-deno-plugin] "Create typescript-deno-plugin"
Info 36   [11:27:29.93] Plugin validation succeded
Info 37   [11:27:29.94] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/next-env.d.ts 500 undefined Project:  WatchType: Closed Script info
Info 38   [11:27:29.95] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/util/data.ts 500 undefined Project:  WatchType: Closed Script info
Info 39   [11:27:29.95] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/util/docs.ts 500 undefined Project:  WatchType: Closed Script info
Info 40   [11:27:29.95] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Class.tsx 500 undefined Project:  WatchType: Closed Script info
Info 41   [11:27:29.95] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Documentation.tsx 500 undefined Project:  WatchType: Closed Script info
Info 42   [11:27:29.96] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Enum.tsx 500 undefined Project:  WatchType: Closed Script info
Info 43   [11:27:29.96] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Footer.tsx 500 undefined Project:  WatchType: Closed Script info
Info 44   [11:27:29.96] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Function.tsx 500 undefined Project:  WatchType: Closed Script info
Info 45   [11:27:29.96] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Header.tsx 500 undefined Project:  WatchType: Closed Script info
Info 46   [11:27:29.97] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Interface.tsx 500 undefined Project:  WatchType: Closed Script info
Info 47   [11:27:29.97] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/JSDoc.tsx 500 undefined Project:  WatchType: Closed Script info
Info 48   [11:27:29.97] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Loading.tsx 500 undefined Project:  WatchType: Closed Script info
Info 49   [11:27:29.98] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Namespace.tsx 500 undefined Project:  WatchType: Closed Script info
Info 50   [11:27:29.98] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Sidebar.tsx 500 undefined Project:  WatchType: Closed Script info
Info 51   [11:27:29.98] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/SinglePage.tsx 500 undefined Project:  WatchType: Closed Script info
Info 52   [11:27:29.98] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Transition.tsx 500 undefined Project:  WatchType: Closed Script info
Info 53   [11:27:29.99] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/TsType.tsx 500 undefined Project:  WatchType: Closed Script info
Info 54   [11:27:29.99] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/TypeAlias.tsx 500 undefined Project:  WatchType: Closed Script info
Info 55   [11:27:29.99] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Variable.tsx 500 undefined Project:  WatchType: Closed Script info
Info 56   [11:27:29.100] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/components/Wrapper.tsx 500 undefined Project:  WatchType: Closed Script info
Info 57   [11:27:29.100] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/404.tsx 500 undefined Project:  WatchType: Closed Script info
Info 58   [11:27:29.100] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/_app.tsx 500 undefined Project:  WatchType: Closed Script info
Info 59   [11:27:29.100] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/_document.tsx 500 undefined Project:  WatchType: Closed Script info
Info 60   [11:27:29.101] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/about.tsx 500 undefined Project:  WatchType: Closed Script info
Info 61   [11:27:29.101] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/index.tsx 500 undefined Project:  WatchType: Closed Script info
Info 62   [11:27:29.101] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/builtin/[version].tsx 500 undefined Project:  WatchType: Closed Script info
Info 63   [11:27:29.102] FileWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/pages/https/[...url].tsx 500 undefined Project:  WatchType: Closed Script info
Info 64   [11:27:29.116] Starting updateGraphWorker: Project: /mnt/f9/Projects/github.com/denoland/doc_website/tsconfig.json
Info 65   [11:27:29.120] FileWatcher:: Added:: WatchInfo: /home/lucacasonato/.cache/deno/lib.deno.unstable.d.ts 500 undefined Project:  WatchType: Closed Script info
Info 66   [11:27:29.141] DirectoryWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/node_modules 1 undefined Project:  WatchType: node_modules for closed script infos in them
Info 67   [11:27:29.141] Elapsed:: 0ms DirectoryWatcher:: Added:: WatchInfo: /mnt/f9/Projects/github.com/denoland/doc_website/node_modules 1 undefined Project:  WatchType: node_modules for closed script infos in them
Info 68   [11:27:29.413] DirectoryWatcher:: Added:: WatchInfo: /snap/code/42/usr/share/code/resources/app/extensions/node_modules 1 undefined Project:  WatchType: node_modules for closed script infos in them
Info 69   [11:27:29.416] Elapsed:: 3ms DirectoryWatcher:: Added:: WatchInfo: /snap/code/42/usr/share/code/resources/app/extensions/node_modules 1 undefined Project:  WatchType: node_modules for closed script infos in them
Err 70    [11:27:29.511] Exception on executing command {"seq":2,"type":"request","command":"updateOpen","arguments":{"changedFiles":[],"closedFiles":[],"openFiles":[{"file":"/mnt/f9/Projects/github.com/denoland/doc_website/api/docs.ts","fileContent":"// Copyright 2020 the Deno authors. All rights reserved. MIT license.\n\nimport {\n  APIGatewayProxyEvent,\n  APIGatewayProxyResult,\n  Context,\n} from \"https://deno.land/x/lambda@1.2.1/mod.ts\";\n\nconst decoder = new TextDecoder();\n\nexport async function handler(\n  event: APIGatewayProxyEvent,\n  context: Context\n): Promise<APIGatewayProxyResult> {\n  const url = new URL(\n    JSON.parse(event.body || '{ \"path\": \"\" }').path,\n    \"https://example.com\"\n  );\n\n  const entrypoint = url.searchParams.get(\"entrypoint\");\n\n  if (!entrypoint) {\n    return {\n      statusCode: 400,\n      body: JSON.stringify({\n        error: \"missing entrypoint query parameter\",\n      }),\n      headers: {\n        \"content-type\": \"application/json; charset=utf-8\",\n      },\n    };\n  }\n\n  const isRemote = entrypoint.startsWith(\"https://\");\n\n  let sourceFile: string;\n  if (isRemote) {\n    sourceFile = entrypoint;\n  } else {\n    return error(\"entrypoint must be a remote https:// module\", 400);\n  }\n\n  const proc = Deno.run({\n    cmd: [\"deno\", \"doc\", sourceFile, \"--json\", \"--reload\"],\n    stdout: \"piped\",\n    stderr: \"piped\",\n  });\n\n  let killed = false;\n\n  // Zeit timeout is 10 seconds for free tier: https://zeit.co/docs/v2/platform/limits\n  const timer = setTimeout(() => {\n    killed = true;\n    proc.kill(Deno.Signal.SIGKILL);\n  }, 9000);\n\n  const [out, errOut] = await Promise.all([\n    proc.output(),\n    proc.stderrOutput(),\n  ]);\n  const status = await proc.status();\n  clearTimeout(timer);\n  proc.close();\n  if (!status.success) {\n    if (killed) return error(\"timed out\", 500);\n    return error(decoder.decode(errOut), 500);\n  }\n\n  return {\n    statusCode: 200,\n    body: JSON.stringify({\n      timestamp: new Date().toISOString(),\n      nodes: JSON.parse(decoder.decode(out)),\n    }),\n    headers: {\n      \"content-type\": \"application/json; charset=utf-8\",\n    },\n  };\n}\n\nfunction error(message: string, code: number) {\n  return {\n    statusCode: code,\n    body: JSON.stringify({\n      error: message,\n    }),\n    headers: {\n      \"content-type\": \"application/json; charset=utf-8\",\n    },\n  };\n}\n","projectRootPath":"/mnt/f9/Projects/github.com/denoland/doc_website","scriptKindName":"TS"}]}}:

    Debug Failure. False expression.

    Error: Debug Failure. False expression.
        at watchFailedLookupLocationsOfExternalModuleResolutions (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104288:26)
        at resolveNamesWithLocalCache (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104152:21)
        at Object.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104193:20)
        at ConfiguredProject.Project.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:142863:45)
        at ConfiguredProject.languageServiceHost.resolveTypeReferenceDirectives (/mnt/f9/Projects/github.com/denoland/vscode_deno/typescript-deno-plugin/out/typescript-deno-plugin/src/plugin.js:197:38)
        at Object.compilerHost.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138740:64)
        at actualResolveTypeReferenceDirectiveNamesWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:99934:143)
        at resolveTypeReferenceDirectiveNamesWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100142:26)
        at processTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101596:31)
        at findSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101434:21)
        at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:85
        at getSourceFileFromReferenceWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101236:34)
        at processSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:13)
        at processTypeReferenceDirective (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101648:25)
        at processTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101603:17)
        at findSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101434:21)
        at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:85
        at getSourceFileFromReferenceWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101236:34)
        at processSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:13)
        at processRootFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101092:13)
        at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100016:60
        at Object.forEach (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:167:30)
        at Object.createProgram (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100016:16)
        at synchronizeHostData (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138755:26)
        at Proxy.getProgram (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138847:13)
        at ConfiguredProject.Project.updateGraphWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:143339:53)
        at ConfiguredProject.Project.updateGraph (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:143282:42)
        at ConfiguredProject.updateGraph (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:144076:63)
        at ProjectService.createLoadAndUpdateConfiguredProject (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:145729:25)
        at ProjectService.assignProjectToOpenedScriptInfo (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146610:44)
        at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146929:97
        at Object.flatMap (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:465:25)
        at ProjectService.applyChangesInOpenFiles (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146929:41)
        at Session.handlers.ts.createMapFromTemplate._a.<computed> (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:147792:46)
        at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149555:88
        at IOSession.Session.executeWithRequestId (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149546:28)
        at IOSession.Session.executeCommand (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149555:33)
        at IOSession.Session.onMessage (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149579:35)
        at Interface.<anonymous> (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:150895:27)
        at Interface.emit (events.js:203:13)
        at Interface._onLine (readline.js:316:10)
        at Interface._normalWrite (readline.js:461:12)
        at Socket.ondata (readline.js:172:10)
        at Socket.emit (events.js:203:13)
        at addChunk (_stream_readable.js:295:12)
        at readableAddChunk (_stream_readable.js:276:11)
        at Socket.Readable.push (_stream_readable.js:210:10)
        at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)
Info 71   [11:27:29.511] response:
    {"seq":0,"type":"response","command":"updateOpen","request_seq":2,"success":false,"message":"Error processing request. Debug Failure. False expression.\nError: Debug Failure. False expression.\n    at watchFailedLookupLocationsOfExternalModuleResolutions (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104288:26)\n    at resolveNamesWithLocalCache (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104152:21)\n    at Object.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:104193:20)\n    at ConfiguredProject.Project.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:142863:45)\n    at ConfiguredProject.languageServiceHost.resolveTypeReferenceDirectives (/mnt/f9/Projects/github.com/denoland/vscode_deno/typescript-deno-plugin/out/typescript-deno-plugin/src/plugin.js:197:38)\n    at Object.compilerHost.resolveTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138740:64)\n    at actualResolveTypeReferenceDirectiveNamesWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:99934:143)\n    at resolveTypeReferenceDirectiveNamesWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100142:26)\n    at processTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101596:31)\n    at findSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101434:21)\n    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:85\n    at getSourceFileFromReferenceWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101236:34)\n    at processSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:13)\n    at processTypeReferenceDirective (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101648:25)\n    at processTypeReferenceDirectives (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101603:17)\n    at findSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101434:21)\n    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:85\n    at getSourceFileFromReferenceWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101236:34)\n    at processSourceFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101269:13)\n    at processRootFile (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:101092:13)\n    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100016:60\n    at Object.forEach (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:167:30)\n    at Object.createProgram (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:100016:16)\n    at synchronizeHostData (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138755:26)\n    at Proxy.getProgram (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:138847:13)\n    at ConfiguredProject.Project.updateGraphWorker (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:143339:53)\n    at ConfiguredProject.Project.updateGraph (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:143282:42)\n    at ConfiguredProject.updateGraph (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:144076:63)\n    at ProjectService.createLoadAndUpdateConfiguredProject (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:145729:25)\n    at ProjectService.assignProjectToOpenedScriptInfo (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146610:44)\n    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146929:97\n    at Object.flatMap (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:465:25)\n    at ProjectService.applyChangesInOpenFiles (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:146929:41)\n    at Session.handlers.ts.createMapFromTemplate._a.<computed> (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:147792:46)\n    at /snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149555:88\n    at IOSession.Session.executeWithRequestId (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149546:28)\n    at IOSession.Session.executeCommand (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149555:33)\n    at IOSession.Session.onMessage (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:149579:35)\n    at Interface.<anonymous> (/snap/code/42/usr/share/code/resources/app/extensions/node_modules/typescript/lib/tsserver.js:150895:27)\n    at Interface.emit (events.js:203:13)\n    at Interface._onLine (readline.js:316:10)\n    at Interface._normalWrite (readline.js:461:12)\n    at Socket.ondata (readline.js:172:10)\n    at Socket.emit (events.js:203:13)\n    at addChunk (_stream_readable.js:295:12)\n    at readableAddChunk (_stream_readable.js:276:11)\n    at Socket.Readable.push (_stream_readable.js:210:10)\n    at Pipe.onStreamRead (internal/stream_base_commons.js:166:17)"}
Info 72   [11:27:29.512] event:
    {"seq":0,"type":"event","event":"typingsInstallerPid","body":{"pid":21855}}
Info 73   [11:27:29.528] request:
    {"seq":3,"type":"request","command":"configurePlugin","arguments":{"pluginName":"typescript-deno-plugin","configuration":{"enable":true,"unstable":true,"import_map":null,"lint":false,"include":["api/docs.ts"],"exclude":[]}}}
Info 74   [11:27:29.528] [typescript-deno-plugin] "onConfigurationChanged: {\"enable\":true,\"unstable\":true,\"import_map\":null,\"lint\":false,\"include\":[\"api/docs.ts\"],\"exclude\":[]}"

There has been previous discussion about this bug in #196.

cc @CGQAQ

@lucacasonato lucacasonato added the bug Something isn't working label Sep 10, 2020
@CGQAQ
Copy link
Contributor

CGQAQ commented Sep 17, 2020

@lucacasonato Please test again use VSCode insiders version
microsoft/vscode#106346 (comment)

@kitsonk
Copy link
Contributor

kitsonk commented Apr 6, 2021

This is stale. Closing.

@kitsonk kitsonk closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants