Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svelte-language-server v0.14 raises error in web browser #1365

Closed
wangjia184 opened this issue Feb 3, 2022 · 1 comment
Closed

svelte-language-server v0.14 raises error in web browser #1365

wangjia184 opened this issue Feb 3, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@wangjia184
Copy link

wangjia184 commented Feb 3, 2022

Describe the bug
Using svelte-language-server in web browser.
Version 0.13.9 works fine; if changing to v0.14.0+ it raises an error in web browser. Please check screenshot below

To Reproduce
Source code is here.
Open package.json, find the following line

"svelte-language-server": "^0.13.9",

Replace it with following line

"svelte-language-server": "^0.14.0",

Then npm install and build the project and refresh the index.html, the error raises.

Expected behavior

This error shouldn't occur in v14+

Screenshots

image
image

Additional context

This error is most likely caused by circular dependency introduced in v14

{
  code: 'CIRCULAR_DEPENDENCY',
  cycle: [
    'node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\features\\utils.js',
    'node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\ComponentInfoProvider.js',
    'node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\features\\utils.js'
  ],
  importer: 'node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\features\\utils.js',
  message: 'Circular dependency: node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\features\\utils.js -> node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\ComponentInfoProvider.js -> node_modules\\svelte-language-server\\dist\\src\\plugins\\typescript\\features\\utils.js',
  toString: [Function (anonymous)]
}
@wangjia184 wangjia184 added the bug Something isn't working label Feb 3, 2022
@dummdidumm
Copy link
Member

Please open such issues at https://github.com/asafamr/monaco-svelte where you forked the repo from. Usage in the browser is not a supported scenario right now, they language server is intended to be used with NodeJS, and we make no guarantees that updates break any shims that make it work in the browser.
We will some day revisit this in the context of #1190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants