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

Connection to server got closed. Server will restart. #2186

Closed
jawalkwan opened this issue Dec 9, 2022 · 4 comments
Closed

Connection to server got closed. Server will restart. #2186

jawalkwan opened this issue Dec 9, 2022 · 4 comments

Comments

@jawalkwan
Copy link

hello, i has an error with volar plugin in vscode.
my vue version is 2, it worked before,but i update vscode and volar plugin lately. now, when i start vscode and open .vue file, i found the error info in console, and editor cannot work normally, i readed all questions and answers in github's issues channel,but always cannot found the resolve way, i cannot work with volar,please help me resolve this question,thx
i tried to fallback vscode and volar's version, but is not works. or i guess i need to change typescript's version?but i didn't use typescript,does it have any relations? @johnsoncodehk

[Info  - 15:41:26] Connection to server got closed. Server will restart.
node:buffer:594
    slice: (buf, start, end) => buf.utf8Slice(start, end),
                                    ^

Error: Cannot create a string longer than 0x1fffffe8 characters
    at Object.slice (node:buffer:594:37)
    at Buffer.toString (node:buffer:812:14)
    at readFileWorker (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\typescript.js:7519:31)
    at Proxy.readFile (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\typescript.js:7523:28)
    at Object.apply (c:\Users\QianManage\.vscode\extensions\vue.volar-1.0.12-win32-x64\dist\node\server.js:495:27020)
    at Object.J [as getScriptSnapshot] (c:\Users\QianManage\.vscode\extensions\vue.volar-1.0.12-win32-x64\dist\node\server.js:494:31455)
    at Proxy.getScriptSnapshot (c:\Users\QianManage\.vscode\extensions\vue.volar-1.0.12-win32-x64\dist\node\server.js:992:1124)
    at p (c:\Users\QianManage\.vscode\extensions\vue.volar-1.0.12-win32-x64\dist\node\server.js:490:26815)
    at Object.get (c:\Users\QianManage\.vscode\extensions\vue.volar-1.0.12-win32-x64\dist\node\server.js:490:26320)
    at Object.createLanguageService (c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\typescript.js:167546:38) {
  code: 'ERR_STRING_TOO_LONG'
}
[Error - 15:41:35] The Vue Semantic Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
@johnsoncodehk
Copy link
Member

It seem that typescript try to read a file that large than 512MB.

Can you can try open c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\typescript.js:7523:28 and print the file path to see what's is that file?

@jawalkwan
Copy link
Author

It seem that typescript try to read a file that large than 512MB.

Can you can try open c:\Program Files\Microsoft VS Code\resources\app\extensions\node_modules\typescript\lib\typescript.js:7523:28 and print the file path to see what's is that file?

yes,i printed the file path and it's my asset file in dist directory. so how can i ignore the file?
@johnsoncodehk

@jawalkwan
Copy link
Author

jawalkwan commented Dec 14, 2022

so is it haven't any method to ignore specific files? or it's not volar's problem? @johnsoncodehk

@johnsoncodehk
Copy link
Member

Please try 1.0.14 when it released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants