microsoft / vscode

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

TS Server fatal error: ENOENT: no such file or directory, open '/Users/yangjinhu/Programs/jsdesign-ai/src/pages/AiPersonalPage/components/MyApp/index.module.less' #197502

Closed renshengyiyijihe closed 9 months ago

renshengyiyijihe commented 9 months ago

Type: Bug

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

TypeScript Version: 5.2.2

Steps to reproduce crash

1. 2. 3.

TS Server Log

❗️ Server logging disabled. To help us fix crashes like this, please enable logging by setting:

"typescript.tsserver.log": "verbose"

After enabling this setting, future crash reports will include the server log.

TS Server Error Stack

Server: semantic

Error: ENOENT: no such file or directory, open '/Users/yangjinhu/Programs/jsdesign-ai/src/pages/AiPersonalPage/components/MyApp/index.module.less'
    at Object.openSync (node:fs:603:3)
    at Object.func [as openSync] (node:electron/js2c/asar_bundle:2:1869)
    at readFileSync (node:fs:471:35)
    at t.readFileSync (node:electron/js2c/asar_bundle:2:9212)
    at getDtsSnapshot (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript-plugin-css-modules/dist/helpers/getDtsSnapshot.js:8:37)
    at languageServiceHost.getScriptSnapshot (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript-plugin-css-modules/dist/index.js:112:60)
    at getOrCreateSourceFileByPath (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:143956:35)
    at Object.getOrCreateSourceFile (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:143952:14)
    at /Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:143876:42
    at Object.getSourceFileWithCache [as getSourceFile] (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:119693:24)
    at findSourceFileWorker (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122097:23)
    at findSourceFile (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122017:20)
    at processImportedModules (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122446:11)
    at findSourceFileWorker (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122152:7)
    at findSourceFile (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122017:20)
    at processImportedModules (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122446:11)
    at findSourceFileWorker (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122152:7)
    at findSourceFile (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:122017:20)
    at /Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:121966:22
    at getSourceFileFromReferenceWorker (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:121935:26)
    at processSourceFile (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:121964:5)
    at processRootFile (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:121761:5)
    at /Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:120508:41
    at forEach (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:2352:22)
    at createProgram (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:120508:5)
    at synchronizeHostData (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:143907:15)
    at Object.getProgram (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:143981:5)
    at ConfiguredProject2.updateGraphWorker (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:176966:41)
    at ConfiguredProject2.updateGraph (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:176817:32)
    at ConfiguredProject2.updateGraph (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:178072:24)
    at _ProjectService.createLoadAndUpdateConfiguredProject (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:179691:13)
    at _ProjectService.assignProjectToOpenedScriptInfo (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:180782:26)
    at /Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:181062:64
    at flatMap (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:2600:17)
    at _ProjectService.applyChangesInOpenFiles (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:181062:24)
    at updateOpen (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:182242:29)
    at /Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:184838:69
    at IpcIOSession.executeWithRequestId (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:184830:14)
    at IpcIOSession.executeCommand (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:184838:29)
    at IpcIOSession.onMessage (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:184880:51)
    at process.<anonymous> (/Users/yangjinhu/Programs/jsdesign-ai/node_modules/typescript/lib/tsserver.js:186461:14)
    at process.emit (node:events:513:28)
    at emit (node:internal/child_process:937:14)
    at process.processTicksAndRejections (node:internal/process/task_queues:83:21)

VS Code version: Code 1.83.1 (Universal) (f1b07bd25dfad64b0167beb15359ae573aecd2cc, 2023-10-10T23:46:55.789Z) OS version: Darwin arm64 21.6.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Apple M1 (8 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|3, 3, 3| |Memory (System)|16.00GB (0.32GB free)| |Process Argv|--crash-reporter-id 09384cd3-10e4-47a6-956b-4067ca2b7210| |Screen Reader|yes| |VM|0%|
Extensions (38) Extension|Author (truncated)|Version ---|---|--- codesnap|adp|1.3.4 vscode-css-formatter|aes|1.0.2 vscode-nginx-conf|ahm|0.3.2 vscode-tailwindcss|bra|0.10.3 vscode-database-client2|cwe|6.8.2 parameter-hints|Dom|0.2.7 es7-react-js-snippets|dsz|4.4.3 gitlens|eam|14.4.1 vsc-material-theme|Equ|33.10.5 vsc-material-theme-icons|equ|3.1.4 prettier-vscode|esb|10.1.0 code-runner|for|0.12.1 shell-format|fox|7.2.5 vscode-github-actions|git|0.26.2 beautify|Hoo|1.5.0 git-graph|mhu|1.30.0 vscode-docker|ms-|1.27.0 vscode-language-pack-zh-hans|MS-|1.83.2023101109 remote-containers|ms-|0.315.1 makefile-tools|ms-|0.7.0 vscode-typescript-next|ms-|5.4.20231105 vscode-react-native|msj|1.12.1 korofileheader|OBK|4.9.3 vetur|oct|0.37.3 miniapp-helper|ove|1.0.3 minapp-vscode|qiu|2.4.12 quicktype|qui|12.0.46 vscode-yaml|red|1.14.0 LiveServer|rit|5.7.9 code-spell-checker|str|3.0.1 open-in-browser|tec|2.0.0 shellcheck|tim|0.34.0 intl-key-generate|und|0.1.0 vscode-gradle|vsc|3.13.3 vscode-icons|vsc|12.6.0 volar|Vue|1.8.22 fig|wit|0.0.7 markdown-all-in-one|yzh|3.5.1 (1 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vsreu685:30147344 python383:30185418 vspor879:30202332 vspor708:30202333 vspor363:30204092 vslsvsres303:30308271 vserr242cf:30382550 pythontb:30283811 vsjup518:30340749 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 vscod805cf:30301675 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 pythonvs932:30410667 py29gd2263:30880072 vsclangdf:30486550 c4g48928:30535728 dsvsc012:30540252 pynewext54:30695312 azure-dev_surveyone:30548225 282f8724:30602487 89544117:30613380 a9j8j154:30646983 showlangstatbar:30737416 pythonfmttext:30731395 fixshowwlkth:30771522 showindicator:30805244 pythongtdpath:30769146 i26e3531:30792625 pythonnosmt12:30797651 pythonidxpt:30866567 pythonnoceb:30805159 synctok:30869157 dsvsc013:30795093 dsvsc014:30804076 dsvsc015:30845448 pythontestfixt:30871694 pythonregdiag2:30871582 pyreplss1:30879912 pythonmypyd1:30879173 pythoncet00cf:30874137 pythontbext0:30879054 dsvsc017:30880892 ```
VSCodeTriageBot commented 9 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.84.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

mjbvz commented 9 months ago

This is caused by the typescript-plugin-css-modules plugin you are using. Please file the issue against them