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
I'm not sure what the root cause is, maybe this needs to be fixed in prettier or svelte, but I'm not familiar enough with their architecture. You might know immediately where this belongs.
As mentioned in #70 I wasn't getting any meaningful error message. All I got was
[error] Unable to expand glob patterns: js/components/DetachableWindow.svelte !**/node_modules/** !./node_modules/** !**/.{git,svn,hg}/** !./.{git,svn,hg}/**
[error] Cannot read property 'line' of undefined
I was able to track this down to node_modules/svelte/compiler.js
where this.start is undefined. It should be this.loc.start. But I don't think something that obvious is a bug in svelte. Not sure what's going on here, since this is compiled from TypeScript.
Once I fixed the line I got
[error] js/components/DetachableWindow.svelte: <script> must have a closing tag
[error] > 1 | <script>
[error] | ^
[error] 2 | import { onDestroy } from "svelte";
[error] 3 |
[error] 4 | let wrapperRef; (1:8)
[error] 1: <script>
[error] ^
[error] 2: import { onDestroy } from "svelte";
[error] 3:
which helped a lot more.
The text was updated successfully, but these errors were encountered:
I could reproduce this and I agree with the analysis above. The start attribute on the error is removed in https://github.com/sveltejs/prettier-plugin-svelte/blob/master/src/index.ts#L33
I don't quite understand why that code does what it does though. We could change it to make an exception for CompileError, but it's quite possible it can just be removed.
Honestly I don't know, I only started taking over the project recently. This PR added it, and it seems it did that for a reason, but I guess we can just delete the delete (hah).
I'm not sure what the root cause is, maybe this needs to be fixed in prettier or svelte, but I'm not familiar enough with their architecture. You might know immediately where this belongs.
As mentioned in #70 I wasn't getting any meaningful error message. All I got was
I was able to track this down to
node_modules/svelte/compiler.js
where
this.start
is undefined. It should bethis.loc.start
. But I don't think something that obvious is a bug in svelte. Not sure what's going on here, since this is compiled from TypeScript.Once I fixed the line I got
which helped a lot more.
The text was updated successfully, but these errors were encountered: