Webstorm Vue 2.0.26 报错

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/@vue/language-server/lib/initialize.js:56
fileWatcher = server.watchFiles(['**/*.{' + [...watchingExtensions].join(',') + '}']);
^

TypeError: server.watchFiles is not a function
at updateFileWatcher (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@vue
/language-server/lib/initialize.js:56:34)
at /Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@vue
/language-server/lib/initialize.js:29:9
at async createTypeScriptLS (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/project/typescriptProjectLs.js:31:40)
at async getParsedCommandLine (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/project/typescriptProject.js:184:29)
at async prepareClosestootParsedCommandLine (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/project/typescriptProject.js:102:17)
at async findMatchTSConfig (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/project/typescriptProject.js:91:9)
at async Object.getLanguageService (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/project/typescriptProject.js:48:30)
at async updateDiagnostics (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/features/languageFeatures.js:682:33)
at async updateDiagnosticsBatch (/Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/
@volar
/language-server/lib/features/languageFeatures.js:678:13)

Node.js v18.18.2
StdIO connection closed
Exit code: 1
Command line: /usr/local/bin/node /Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26/node_modules/@vue/language-server/bin/vue-language-server.js --stdio
  • 找到 language-server 的目录
1
cd /Users/wxz/Library/Caches/JetBrains/WebStorm2024.2/javascript/typings/@vue/language-server/2.0.26
  • Upgrade volar packages to 2.4.0-alpha.20 with:
1
npm install @volar/language-core@2.4.0-alpha.20 @volar/language-server@2.4.0-alpha.20