microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.29k stars 29.31k forks source link

When flow-typed is installed in JS + Flow project I get error "TS Server fatal error: Maximum call stack size exceeded" #225222

Closed vadbertalan closed 3 months ago

vadbertalan commented 3 months ago

Type: Bug

❗️❗️❗️ Please fill in the sections below to help us diagnose the issue ❗️❗️❗️

TypeScript Version: 5.5.4 flow-bin: 0.158.0 Flow Language Support: 2.2.1 VSCode version: 1.92.0

Steps to reproduce crash

  1. Create JavaScript project.
  2. Add vscode extension Flow Language Support (flowtype.flow-for-vscode)
  3. Install flow-typed library and add flow-typed install command to postinstall script in package.json. - ❗️ NOTE: if this step is omitted and flow-typed lib definitions are not present, the JS/TS extension works fine. ❗️
  4. Observe in VSCode that in the bottom right, where it writes "JavaScript", to the left of it the refresh icon is spinning forever and if I click the spinning refresh icon instead of writing jsconfig.json, it writes: "Loading IntelliSense status"
  5. Observe VSCode notification saying "Extension JS/TS crash over 5 times, will not restart...". Also observe that useful functionalities are not working anymore, such as Smart JS aware Expand Selection or options in Code Actions combo box.

image

TS Server Log

❗️ Please review and upload this log file to help us diagnose this crash:

Info 0    [10:16:24.199] Starting TS Server
Info 1    [10:16:24.199] Version: 5.5.4
Info 2    [10:16:24.199] Arguments: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/tsserver.js --useInferredProjectPerProjectRoot --enableTelemetry --cancellationPipeName /var/folders/zv/b072t8q52ks2rhmr2m8_nmp00000gn/T/vscode-typescript501/7af023be7f518508673f/tscancellation-80c0c50407197c479255.tmp* --logVerbosity verbose --logFile <home_path>/Library/Application Support/Code/logs/20240806T164839/window1/exthost/vscode.typescript-language-features/tsserver-log-dnbSK9/tsserver.log --locale en --noGetErrOnBackgroundUpdate --canUseWatchEvents --validateDefaultNpmLocation --useNodeIpc
Info 3    [10:16:24.199] Platform: darwin NodeVersion: v20.14.0 CaseSensitive: false
Info 4    [10:16:24.199] ServerMode: undefined hasUnknownServerMode: undefined
Info 5    [10:16:24.202] Binding...
Info 6    [10:16:24.205] request:
    {
      "seq": 0,
      "type": "request",
      "command": "configure",
      "arguments": {
        "hostInfo": "vscode",
        "preferences": {
          "providePrefixAndSuffixTextForRename": true,
          "allowRenameOfImportPath": true,
          "includePackageJsonAutoImports": "auto",
          "excludeLibrarySymbolsInNavTo": true
        },
        "watchOptions": {}
      }
    }
Info 7    [10:16:24.205] Host information vscode
Info 8    [10:16:24.205] Host watch options changed to undefined, it will be take effect for next watches.
Info 9    [10:16:24.205] response:
    {"seq":0,"type":"response","command":"configure","request_seq":0,"success":true}
Perf 10   [10:16:24.205] 0::configure: async elapsed time (in milliseconds) 0.4653
Info 11   [10:16:24.205] request:
    {
      "seq": 1,
      "type": "request",
      "command": "compilerOptionsForInferredProjects",
      "arguments": {
        "options": {
          "module": "ESNext",
          "moduleResolution": "Bundler",
          "target": "ES2020",
          "jsx": "react",
          "allowImportingTsExtensions": true,
          "strictNullChecks": true,
          "strictFunctionTypes": true,
          "sourceMap": true,
          "allowJs": true,
          "allowSyntheticDefaultImports": true,
          "allowNonTsExtensions": true,
          "resolveJsonModule": true
        }
      }
    }
Perf 12   [10:16:24.205] 1::compilerOptionsForInferredProjects: elapsed time (in milliseconds) 0.1060
Info 13   [10:16:24.205] response:
    {"seq":0,"type":"response","command":"compilerOptionsForInferredProjects","request_seq":1,"success":true,"body":true}
Info 14   [10:16:24.205] event:
    {"seq":0,"type":"event","event":"typingsInstallerPid","body":{"pid":67890}}
Info 15   [10:16:24.206] request:
    {
      "seq": 2,
      "type": "request",
      "command": "updateOpen",
      "arguments": {
        "changedFiles": [],
        "closedFiles": [],
        "openFiles": [
          {
            "file": "<project_path>/<path_to_main_navigator>/mainNavigator.js",
            "fileContent": "// @flow <js_file_content>",
            "projectRootPath": "<project_path>",
            "scriptKindName": "JS"
          },
          {
            "file": "<project_path>/<path_to_main_navigator>/mainNavigator.js",
            "fileContent": "// @flow <js_file_content>",
            "projectRootPath": "<project_path>",
            "scriptKindName": "JS"
          }
        ]
      }
    }
Info 16   [10:16:24.206] getConfigFileNameForFile:: File: <project_path>/<path_to_main_navigator>/mainNavigator.json
Info 17   [10:16:24.206] Creating configuration project <project_path>/jsconfig.json
Info 18   [10:16:24.207] FileWatcher:: Added:: WatchInfo: <project_path>/jsconfig.json 2000 undefined Project: <project_path>/jsconfig.json WatchType: Config file
Info 19   [10:16:24.207] event:
    {"seq":0,"type":"event","event":"createFileWatcher","body":{"id":1,"path":"<project_path>/jsconfig.json"}}
Info 20   [10:16:24.208] event:
    {"seq":0,"type":"event","event":"projectLoadingStart","body":{"projectName":"<project_path>/jsconfig.json","reason":"Creating possible configured project for <project_path>/<path_to_main_navigator>/mainNavigator.js to open"}}
Info 21   [10:16:26.079] Config: <project_path>/jsconfig.json : {
 "rootNames": [
   "<paths_of_the_project_files>"
 ],
 "options": {
  "allowJs": true,
  "maxNodeModuleJsDepth": 2,
  "allowSyntheticDefaultImports": false,
  "skipLibCheck": true,
  "noEmit": true,
  "experimentalDecorators": true,
  "target": 4,
  "baseUrl": "<project_path>",
  "paths": {
   "@/*": [
    "./app/*"
   ]
  },
  "pathsBasePath": "<project_path>",
  "configFilePath": "<project_path>/jsconfig.json"
 }
}
Info 22   [10:16:26.085] DirectoryWatcher:: Added:: WatchInfo: <project_path> 1 undefined Config: <project_path>/jsconfig.json WatchType: Wild card directory
Info 23   [10:16:26.085] event:
    {"seq":0,"type":"event","event":"createDirectoryWatcher","body":{"id":2,"path":"<project_path>","recursive":true,"ignoreUpdate":true}}
Info 24   [10:16:26.085] Elapsed:: 0.09120899999993526ms DirectoryWatcher:: Added:: WatchInfo: <project_path> 1 undefined Config: <project_path>/jsconfig.json WatchType: Wild card directory
Info 25   [10:16:26.085] FileWatcher:: Added:: WatchInfo: <project_path>/ReactotronConfig.js 500 undefined WatchType: Closed Script info
Info 26   [10:16:26.085] event:
    {"seq":0,"type":"event","event":"createFileWatcher","body":{"id":3,"path":"<project_path>/ReactotronConfig.js"}}
Info 27   [10:16:26.085] FileWatcher:: Added:: WatchInfo: <project_path>/babel.config.js 500 undefined WatchType: Closed Script info

Err 2548  [10:16:27.380] Exception on executing command {
  "seq": 2,
  "type": "request",
  "command": "updateOpen",
  "arguments": {
    "changedFiles": [],
    "closedFiles": [],
    "openFiles": [
      {
        "file": "<project_path>/<path_to_main_navigator>/mainNavigator.js",
        "fileContent": "// @flow <js_file_content>",
        "projectRootPath": "<project_path>",
        "scriptKindName": "JS"
      },
      {
        "file": "<project_path>/<path_to_main_navigator>/mainNavigator.js",
        "fileContent": "// @flow <js_file_content>",
        "projectRootPath": "<project_path>",
        "scriptKindName": "JS"
      }
    ]
  }
}:

    Maximum call stack size exceeded

    RangeError: Maximum call stack size exceeded
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2385:17)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxAttributes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32118:12)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bindContainer (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46261:7)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47659:9)
        at visitNode2 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31743:18)
        at forEachChildInJsxOpeningOrSelfClosingElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32236:97)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at visitNode2 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31743:18)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:12)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
        at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)
        at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)
        at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)
        at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)
        at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)
        at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)
        at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)
        at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)
Info 2549 [10:16:27.380] response:
    {"seq":0,"type":"response","command":"updateOpen","request_seq":2,"success":false,"message":"Error processing request. Maximum call stack size exceeded\nRangeError: Maximum call stack size exceeded\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2385:17)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxAttributes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32118:12)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bindContainer (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46261:7)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47659:9)\n    at visitNode2 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31743:18)\n    at forEachChildInJsxOpeningOrSelfClosingElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32236:97)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at visitNode2 (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31743:18)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:12)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)\n    at bind (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:47657:9)\n    at forEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:2388:22)\n    at bindEach (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46275:5)\n    at visitNodes (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:31748:14)\n    at forEachChildInJsxElement (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32110:55)\n    at forEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:32264:35)\n    at bindEachChild (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46278:5)\n    at bindChildren (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/node_modules/typescript/lib/typescript.js:46397:9)"}
Info 2550 [10:16:27.381] request:
    {
      "seq": 3,
      "type": "request",
      "command": "configure",
      "arguments": {
        "file": "<project_path>/<path_to_main_navigator>/mainNavigator.js",
        "formatOptions": {
          "tabSize": 2,
          "indentSize": 2,
          "convertTabsToSpaces": true,
          "newLineCharacter": "\n",
          "insertSpaceAfterCommaDelimiter": true,
          "insertSpaceAfterConstructor": false,
          "insertSpaceAfterSemicolonInForStatements": true,
          "insertSpaceBeforeAndAfterBinaryOperators": true,
          "insertSpaceAfterKeywordsInControlFlowStatements": true,
          "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true,
          "insertSpaceBeforeFunctionParenthesis": false,
          "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,
          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,
          "insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
          "insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": true,
          "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,
          "insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces": false,
          "placeOpenBraceOnNewLineForFunctions": false,
          "placeOpenBraceOnNewLineForControlBlocks": false,
          "semicolons": "ignore"
        },
        "preferences": {
          "quotePreference": "single",
          "importModuleSpecifierPreference": "non-relative",
          "importModuleSpecifierEnding": "auto",
          "jsxAttributeCompletionStyle": "auto",
          "allowTextChangesInNewFiles": true,
          "providePrefixAndSuffixTextForRename": true,
          "allowRenameOfImportPath": true,
          "includeAutomaticOptionalChainCompletions": true,
          "provideRefactorNotApplicableReason": true,
          "generateReturnInDocTemplate": true,
          "includeCompletionsForImportStatements": true,
          "includeCompletionsWithSnippetText": true,
          "includeCompletionsWithClassMemberSnippets": true,
          "includeCompletionsWithObjectLiteralMethodSnippets": true,
          "autoImportFileExcludePatterns": [],
          "preferTypeOnlyAutoImports": false,
          "useLabelDetailsInCompletionEntries": true,
          "allowIncompleteCompletions": true,
          "displayPartsForJSDoc": true,
          "disableLineTextInReferences": true,
          "interactiveInlayHints": true,
          "includeCompletionsForModuleExports": true,
          "includeInlayParameterNameHints": "none",
          "includeInlayParameterNameHintsWhenArgumentMatchesName": false,
          "includeInlayFunctionParameterTypeHints": false,
          "includeInlayVariableTypeHints": false,
          "includeInlayVariableTypeHintsWhenTypeMatchesName": false,
          "includeInlayPropertyDeclarationTypeHints": false,
          "includeInlayFunctionLikeReturnTypeHints": false,
          "includeInlayEnumMemberValueHints": false
        }
      }
    }
Info 2551 [10:16:27.381] Host configuration update for file <project_path>/<path_to_main_navigator>/mainNavigator.js
Info 2552 [10:16:27.381] response:
    {"seq":0,"type":"response","command":"configure","request_seq":3,"success":true}
Perf 2553 [10:16:27.381] 3::configure: async elapsed time (in milliseconds) 0.2459

I scrubbed the log file.

VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Darwin arm64 23.3.0 Modes:

Extensions (30) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 codesnap|adp|1.3.4 vscode-toggle-quotes|Bri|0.3.6 turbo-console-log|Cha|2.10.4 vscode-eslint|dba|3.0.10 gitlens|eam|15.2.3 EditorConfig|Edi|0.16.4 prettier-vscode|esb|10.4.0 vscode-jest-runner|fir|0.4.73 flow-for-vscode|flo|2.2.1 auto-rename-tag|for|0.1.10 copilot|Git|1.221.0 copilot-chat|Git|0.18.1 rest-client|hum|0.25.1 vscode-dimmer-block|ima|2.2.0 plantuml|jeb|2.18.1 git-graph|mhu|1.30.0 hexeditor|ms-|1.10.0 gradle-language|nac|0.2.3 color-highlight|nau|2.8.0 vscode-versionlens|pfl|1.14.2 material-icon-theme|PKi|5.8.0 vscode-xml|red|0.27.1 vscode-yaml|red|1.15.0 partial-diff|ryu|1.4.3 svg-preview|Sim|2.8.3 code-spell-checker|str|3.0.1 errorlens|use|3.20.0 FilterText|yhi|0.0.15 material-theme|zhu|3.17.2 (3 theme extensions excluded)
vs-code-engineering[bot] commented 3 months ago

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.92.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

vadbertalan commented 3 months ago

After updating vscode to 1.92.1, the problem still persists.

mjbvz commented 3 months ago

VS Code does not ship with built-in Flow support and our builtin js/ts support may not handle flow files. To use Flow, install the flow extension and follow these instructions

Once configured properly, the TS server should try not parse flow files at all