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

Can't integrate with sveltekit #23

Closed
paoloricciuti opened this issue Apr 28, 2023 · 2 comments
Closed

Can't integrate with sveltekit #23

paoloricciuti opened this issue Apr 28, 2023 · 2 comments

Comments

@paoloricciuti
Copy link

When I try to call the languageServer function directly in the script tag it crashes with some weird error from svelte. If I try to call the languageServer function onMount it throws this error

caught (in promise) TypeError: events_1.EventEmitter is not a constructor
    at new TransportRequestManager2 (codemirror-languageserver.js?v=a7fd2213:318:40)
    at WebSocketTransport3.Transport2 (codemirror-languageserver.js?v=a7fd2213:467:42)
    at new WebSocketTransport3 (codemirror-languageserver.js?v=a7fd2213:1500:30)
    at languageServer (codemirror-languageserver.js?v=a7fd2213:8519:16)
    at +page.svelte?t=1682723499451:156:25
    at run (chunk-PUOMPBAM.js?v=a7fd2213:19:10)
    at Array.map (<anonymous>)
    at chunk-PUOMPBAM.js?v=a7fd2213:1806:52
    at flush (chunk-PUOMPBAM.js?v=a7fd2213:1092:9)
    at init (chunk-PUOMPBAM.js?v=a7fd2213:1888:5)
T

Can you provide some hints on how can I fix this?

P.s. the fact that you can connect to an lsp from codemirror is just magical...thanks for your work ✨

@paoloricciuti
Copy link
Author

I think this might be the issue

open-rpc/client-js#310

I'm investigating this further

@paoloricciuti
Copy link
Author

paoloricciuti commented Apr 29, 2023

Ok it was definitely related to this, sorry for the not useful issue...closing this

Btw adding events@^3.3.0 as a peer dependency might be beneficial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant