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

After updating to version 0.34.0, TS code formatting does not work #2982

Closed
2 tasks done
Eurkidu opened this issue Jun 4, 2021 · 0 comments
Closed
2 tasks done

After updating to version 0.34.0, TS code formatting does not work #2982

Eurkidu opened this issue Jun 4, 2021 · 0 comments

Comments

@Eurkidu
Copy link

Eurkidu commented Jun 4, 2021

  • I have searched through existing issues
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: macOS
  • Vetur version: 0.34.0
  • VS Code version: 1.56.2

Problem

After updating to version 0.34.0, Using the formatting command got an error "Prettier format failed" in single vue file when script use typescript
Formatted normally in version 0.33.1

Vetur initialized
[INFO ] Loaded bundled typescript@4.3.2.
[INFO ] Loaded bundled prettier.
[INFO ] Loaded bundled @starptech/prettyhtml.
[INFO ] Loaded bundled prettier-eslint.
[INFO ] Loaded bundled prettier-tslint.
[INFO ] Loaded bundled stylus-supremacy.
[INFO ] Loaded bundled @prettier/plugin-pug.
Prettier format failed
[Error - 10:12:57 PM] Error: Couldn't resolve parser "pug"
    at resolveParser$1 (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/node_modules/prettier/index.js:14866:13)
    at normalize$1 (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/node_modules/prettier/index.js:14961:18)
    at formatWithCursor$1 (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/node_modules/prettier/index.js:16646:46)
    at /Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/node_modules/prettier/index.js:60922:12
    at Object.format (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/node_modules/prettier/index.js:60942:12)
    at prettierify (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/dist/vls.js:641:32)
    at Object.format (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/dist/vls.js:678:3316)
    at /Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/dist/vls.js:874:4009
    at Array.forEach (<anonymous>)
    at Object.onDocumentFormatting (/Users/eurkidu/.vscode/extensions/octref.vetur-0.34.0/server/dist/vls.js:874:3955)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants