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.

Version 3.0.1 leads to false parsing errors in Vue 2

See original GitHub issue

Version 3.0.1 causes parsing errors like the following:

  • Parsing error: Unexpected closing tag “td”
  • Parsing error: Unexpected closing tag “script”
  • Parsing error: Unexpected closing tag “div”
  • Parsing error: Unexpected character “EOF”

In my project, almost every Vue file with a template section contains exactly one of these errors. However, the files are fine. As soon as I remove or downgrade prettier-plugin-organize-imports, the errors are gone and everything works as expected.

I use the following setup, which is more or less the exact setup that every newly created vue 2 project has:

...
"dependencies": {
  ...
  "vue": "2.7.8",
  ...
},
"devDependencies": {
  "@rushstack/eslint-patch": "1.1.4",
  ...
  "@types/node": "18.6.3",
  "@vitejs/plugin-vue2": "1.1.2",
  "@volar/vue-typescript": "0.39.4",
  "@vue/eslint-config-prettier": "7.0.0",
  "@vue/eslint-config-typescript": "11.0.0",
  "@vue/tsconfig": "0.1.3",
  "eslint": "8.21.0",
  "eslint-plugin-vue": "9.3.0",
  "npm-run-all": "4.1.5",
  "prettier": "2.7.1",
  "prettier-plugin-organize-imports": "3.0.1",
  "typescript": "4.7.4",
  "vite": "3.0.4",
  "vue-tsc": "0.39.4"
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
Santobertcommented, Aug 8, 2022

It seems there is already an issue opened: https://github.com/johnsoncodehk/volar/issues/1670

0reactions
simonhaenischcommented, Aug 8, 2022

Ok cool thanks for confirming… I think I’ll have to redirect you to https://github.com/johnsoncodehk/volar then, to open an issue there about the recent versions of @volar/vue-typescript not working correctly on Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TS Parsing errors · Issue #1223 · vuejs/eslint-plugin-vue · GitHub
I have a fair amount of complex TS in .ts files as well, but I'm only getting parser errors from .vue files. So...
Read more >
vue.js - "Parsing error: Unexpected token < ..." using VueCli3 ...
"Unexpected token <" for VueJS running with Webpack. Here is part of my package.json setting: "devDependencies": { "@vue/cli-plugin-babel" ...
Read more >
vue/no-parsing-error
This rule tries to parse directives/mustaches in <template> by the parser which parses <script> . Then reports syntax errors if exist. 1. 2....
Read more >
npm ERR! Unexpected end of JSON input while parsing near
Tagged with errors, troubleshooting, npm, webdev. ... to create a new angular, react, vue app, and you end up with an error message...
Read more >
Bug listing with status RESOLVED with resolution TEST ...
... Bug:21638 - "bitkeeper-3.0.1-r2.ebuild (Bugfix/Update)" status:RESOLVED ... [default] Error 2" status:RESOLVED resolution:TEST-REQUEST severity:major ...
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