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

Unable to locate the error file line number of v-on #405

Open
8 of 9 tasks
axolo opened this issue May 17, 2024 · 0 comments
Open
8 of 9 tasks

Unable to locate the error file line number of v-on #405

axolo opened this issue May 17, 2024 · 0 comments
Labels
p2-nice-to-have 🍰 Not breaking anything but nice to have (priority)

Comments

@axolo
Copy link

axolo commented May 17, 2024

Related plugins

Describe the bug

Unable to locate the error file line number of v-on.

no semicolon and no arrow function, like:

<my-dialog
  @close="
    show = false
    id = ''
  "
/>

output:

error during build:
SyntaxError: Error parsing JavaScript expression: Unexpected token, expected "," (3:0)
    at createCompilerError (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:1329:17)
    at emitError (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:2822:5)
    at createExp (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:2815:7)
    at Object.onattribend (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:2336:29)
    at Tokenizer.handleInAttrValue (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:909:16)
    at Tokenizer.stateInAttrValueDoubleQuotes (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:919:10)
    at Tokenizer.parse (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:1063:16)
    at Object.baseParse (D:\my-project\node_modules\@vue\compiler-core\dist\compiler-core.cjs.js:2861:13)
    at Object.parse (D:\my-project\node_modules\@vue\compiler-dom\dist\compiler-dom.cjs.js:707:23)
    at Object.parse$2 [as parse] (D:\my-project\node_modules\@vue\compiler-sfc\dist\compiler-sfc.cjs.js:1853:24)

Reproduction

see Describe

Steps to reproduce

No response

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
    Memory: 5.74 GB / 15.76 GB
  Binaries:
    Node: 22.1.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.7.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.3527
  npmPackages:
    @vitejs/plugin-legacy: ^5.3.1 => 5.3.2 
    @vitejs/plugin-vue: ^5.0.4 => 5.0.4 
    vite: ^5.1.4 => 5.2.11

Used Package Manager

npm

Logs

see Describe

Validations

@haoqunjiang haoqunjiang added the p2-nice-to-have 🍰 Not breaking anything but nice to have (priority) label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have 🍰 Not breaking anything but nice to have (priority)
Projects
None yet
Development

No branches or pull requests

2 participants