coc-svelte
coc-svelte copied to clipboard
Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.
Got this issue when running coc-svelte
with svelte-kit and TS. The coc-svelte
won't lint my code and give any error messages when the this error below pop ups
You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.
initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
[svelte:]
Found out that this happens exactly when i start writing code inside <script lang="ts></script>
.
So for example, this code below won't trigger the error
<script lang="ts"></script>
<div />
<style></style>
But this will:
<script lang="ts">
console.log("Annoying error :(");
</script>
<div />
<style></style>
I will share more updates and hopefully open a PR when I have the time
Also just ran into this issue. It started happening when we upgraded our project to Node 18.

Saw something similar in the language-tools repo, might be related: https://github.com/sveltejs/language-tools/issues/1455 https://github.com/sveltejs/language-tools/pull/1464
Haven't tested this, but it might be that upgrading language-tools might resolve it.