coc-extensions / coc-svelte

svelte support for (Neo)Vim
MIT License
178 stars 24 forks source link

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

Open stevenhansel opened 2 years ago

stevenhansel commented 2 years ago

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 commented 2 years ago

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

rudolfs commented 2 years ago

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.