sublimelsp / LSP-svelte

Convenience plugin for Svelte Language Tools
MIT License
16 stars 0 forks source link

warning Cannot find module '/home/vinoff/my-app/node_modules/svelte/compiler' ​svelte #110

Closed vinoff closed 1 year ago

vinoff commented 1 year ago
/home/vinoff/my-app/src/routes/Header.svelte:
    1:1   warning Cannot find module '/home/vinoff/my-app/node_modules/svelte/compiler' ​svelte
                  Require stack:
                  - /home/vinoff/.cache/sublime-text/Package Storage/LSP-svelte/20.4.0/server/node_modules/svelte-language-server/dist/src/importPackage.js
                  - /home/vinoff/.cache/sublime-text/Package Storage/LSP-svelte/20.4.0/server/node_modules/svelte-language-server/dist/src/lib/documents/configLoader.js
                  - /home/vinoff/.cache/sublime-text/Package Storage/LSP-svelte/20.4.0/server/node_modules/svelte-language-server/dist/src/lib/documents/Document.js
                  - /home/vinoff/.cache/sublime-text/Package Storage/LSP-svelte/20.4.0/server/node_modules/svelte-language-server/dist/src/lib/documents/index.js
                  - /home/vinoff/.cache/sublime-text/Package Storage/LSP-svelte/20.4.0/server/node_modules/svelte-language-server/dist/src/server.js
                  - /home/vinoff/.cache/sublime-text/Package Storage/LSP-svelte/20.4.0/server/node_modules/svelte-language-server/bin/server.js

I am getting this error. I have lsp and lsp-svelte installed. Lsp works correctly in other situations (pure JS, python, etc). I restarted both sublime and the pc (just in case, you know the drill). I am on Arch Linux, if that is important.

What's going on?

EDIT:

It is flagging this section of the code, which is the very first line:


<script>
  import messagesLetter from "../static/images/messages-letter.svg";
</script>
predragnikolic commented 1 year ago

Sorry for the late reply, can you please provide a repository that can reproduce this?

predragnikolic commented 1 year ago

Have you run npm install?

predragnikolic commented 1 year ago

Closing this issue doe to lack of response.

If someone runs into this issue again, please provide a way to reproduce the issue.