Changes in a symlinked monorepo package are not reflected in other apps
See original GitHub issueDescribe the bug In a pnpm monorepo, a change made in a Svelte file in a package will not be reflected in apps until the LSP is restarted.
To Reproduce Clone: https://github.com/AnatoleLucet/svelte-lsp-monorepo-issue and install the deps with pnpm.
Both the ui
package and the web
app are barebone SvelteKit projects.
The ui
package exports the Hello.svelte
component, which has a prop named word
of type string
.
The web
app is importing the ui
package and using the Hello.svelte
component in src/routes/index.svelte
.
If I change word
’s type to a number
, the LSP will not reflect this change in the web
app. I need to restart the LSP to get the expected Type 'string' is not assignable to type 'number'.
.
Expected behavior Reflect the changes when another package is changed (as the typescript LSP is doing)
Screenshots
System (please complete the following information):
- OS: Linux Manjaro 21.2.3
- IDE: NeoVim 0.6.1 with the lsp-config plugin
- Plugin/Package: svelte-language-server 0.14.23
Additional context I’m not sure why, but I do not see the issue in VsCode. You can check out the NeoVim Svelte lsp-config here.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
We usually just use vscode to launch the extension together with the server. And use vscode to debug. But since you might want to debug with neovim. You’ll have to add a --inspect flag to your server command. Launch the server and then attach the debugger to the node process. Debugger wise, a chrome browser should be the easiest. Or you could clone our repo and use our debugger config (attach) with a
--inspect=6009
flag in your server command config to debug on vscode.I have to find some time to figure out how to set up a neovim with LSP, either on windows or WSL. It probably is the second most used LSP client of svelte language server. but I don’t know how to set it up to debug it.
Sounds related to #1301 (or maybe even a duplicate of it). The difference to #1301 is that #1301 talks about this in the context of TS files, whereas this is about changes in Svelte files.