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

fix(typescript-plugin): fault tolerance for named pipe servers json file #4075

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

Simon-He95
Copy link
Contributor

After the upgrade, I suddenly found that the syntax in the template was invalid, and then tracked the problem and found that there was a problem reading the file in searchNamedPipeServerForFile. The format may have been broken when writing a certain version, resulting in JSON here. When JSON.parse, an error is reported directly, but no interception is done, and then there is no code prompt. I don’t know if I should delete the temp file directly when there is a problem with parse. At present, I have added try {} catch (e) {} to solve the problem.

The following is the format of the file that I found during troubleshooting.
image

@johnsoncodehk johnsoncodehk changed the title fix(searchNamedPipeServerForFile): parse temp file error fix(typescript-plugin): fault tolerance for named pipe servers json file Mar 20, 2024
@johnsoncodehk
Copy link
Member

Thanks! This may be caused by multiple tsserver processes overwriting json files at the same time.

@johnsoncodehk johnsoncodehk merged commit 618a42c into vuejs:master Mar 20, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants