question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension 'Vetur' cannot format 'test.vue'

See original GitHub issue

Info

  • Platform: macOS
  • Vetur version: 0.24.0
  • VS Code version: 1.47.0-insider

Problem

After setting Vetur as the default formatter for Vue files I get a generic error when trying to format a vue component: Extension ‘Vetur’ cannot format ‘test.vue’

2020-06-24 09 07 20

Reproducible Case

Install Vetur and set it as the default formatter. Create a new Vue component:

<template lang="pug">
div
  div.my-class Test
</template>

Then right click and click ‘Format Document’.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
joel-wenzelcommented, Feb 6, 2021

What worked for me was changing: "vetur.format.enable": false to "vetur.format.enable": true

I think quasar might disable this by default when creating through the cli

7reactions
guigagbcommented, Jul 18, 2020

In any project quasar have a some problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

vue.js - VS Code can't format code in <script> tags in .vue files ...
I've just started using the Vetur VS Code extension for formatting .vue files. Everything seemed to work fine (syntax highlight, EMMET, etc.) ...
Read more >
How I Resolved Vue.js, VSCode, Vetur, Prettyhtml, and ...
So, when open a . vue file in VS Code and Format Document with Vetur, it uses Prettyhtml by default, which violates prettier...
Read more >
Formatting | Vetur - GitHub Pages
Vetur only has a "whole document formatter" and cannot format arbitrary ranges. As a result, only the Format Document command is available. The...
Read more >
User Guide | eslint-plugin-vue
If you want to run eslint from the command line, make sure you include the .vue extension using the --ext option or a...
Read more >
VS Code tips — The Vetur extension for working with Vue.js
Your browser can't play this video. ... Today's VS Code extension : Vetur Vetur adds all the editor tools for writing Vuejs in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found