coc-svelte icon indicating copy to clipboard operation
coc-svelte copied to clipboard

Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.

Open stevenhansel opened this issue 2 years ago • 2 comments

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:] 

stevenhansel avatar May 24 '22 13:05 stevenhansel

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

stevenhansel avatar May 24 '22 14:05 stevenhansel

Also just ran into this issue. It started happening when we upgraded our project to Node 18.

Screenshot 2022-10-04 at 17 59 34

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.

rudolfs avatar Oct 04 '22 15:10 rudolfs