You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I have a syntax error in a svelte file, the error message does not indicate which line to look at.
For example, in the script section of a svelte file, I began a "$:" line, but didn't finish it (leave it dangling, with no statement following the "$:"). This is a syntax error. I received the following error message when compiling:
🚨 /Users/duane/Projects/relm/src/audiovideo/Conference.svelte: Unexpected token
at error$1 (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15595:20)
at Parser$1.error (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15671:10)
at Parser$1.acorn_error (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15665:15)
at Object.read_script [as read] (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:7377:17)
at tag (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:14737:34)
at new Parser$1 (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15630:22)
at parse$3 (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:15761:21)
at compile (/Users/duane/Projects/relm/node_modules/svelte/compiler.js:26931:18)
at SvelteAsset.generate (/Users/duane/Projects/relm/node_modules/parcel-plugin-svelte/lib/svelte-asset.js:43:25)
🐛 Bug Report
When I have a syntax error in a svelte file, the error message does not indicate which line to look at.
For example, in the script section of a svelte file, I began a "$:" line, but didn't finish it (leave it dangling, with no statement following the "$:"). This is a syntax error. I received the following error message when compiling:
See sveltejs/svelte#5411
💻 Code Sample
Leave a dangling
$:
somewhere inside the<script>
section of a .svelte file to generate a syntax error.🌍 Your Environment
Svelte: 3.23.2
The text was updated successfully, but these errors were encountered: