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.

Unexpected token "indent" on Vue 3 template

See original GitHub issue

Vue version: 3.0.1

Related issue: vuejs/rollup-plugin-vue#86

With the default indentation style of 2 spaces on templates, I’m getting the following issue:

    1|
  > 2|   div(:class="styleClasses")
-------^
    3|     span(
    4|       contenteditable
    5|       ref="textField"

unexpected token "indent"

This doesn’t seem to happen on version 2 though.

Possible solution #17

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:22

github_iconTop GitHub Comments

11reactions
xxSkyycommented, Dec 28, 2020

Same problem, cant use beautifier due of this. Should be fixed as vue3 coming fast to get as daily.

5reactions
linhntaimcommented, Sep 2, 2021

image

I found a temporary solution for it: Not put the indent at the first line in template and it works well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix Indent error in pug with vue js - Stack Overflow
@EugenyVenegrad Here is the indent issue by pug-plain-loader [Unexpected token "indent" on Vue 3 template ](github.com/yyx990803/pug-plain- ...
Read more >
How to use an indent for Pug code in Vue template - Reddit
The problem. When using Pug with an indent then occurs the issue: Unexpected token "indent" on Vue 3 template. Currently, Pug code must...
Read more >
vue/no-parsing-error
vue/no-parsing-error #. disallow parsing errors in <template>. ⚙️ This rule is included in all of "plugin:vue/vue3 ...
Read more >
"Unexpected token 'indent'" when using pug template
"Unexpected token 'indent'" when using pug template. ... rollup-plugin-vue ... These two templates should work the same as each other:
Read more >
[Solved]-EJS Unexpected token / - Using Partials-node.js
Coding example for the question EJS Unexpected token / - Using Partials-node.js. ... EJS now has a different syntax for partials starting 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 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