question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Changes in a symlinked monorepo package are not reflected in other apps

See original GitHub issue

Describe 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:open
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jasonlyu123commented, Mar 18, 2022

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.

1reaction
dummdidummcommented, Mar 17, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Case for Monorepos: A sane Workspace Setup (Part 2)
Learn how to setup dev tooling in a monorepo, run tasks efficiently, release multiple packages and overcome common DevOps challenges.
Read more >
Npm link set up advice and troubleshooting - Code Buckets
Troubleshooting npm link · 1. Check you've linked every package · 2. Don't globally install your local packages · 3. Check you've linked...
Read more >
Why doesn't Lerna symlink my dependencies? - Stack Overflow
I've recently migrated a large JS project to a JS monorepo. ... same dependencies (not symlinks) in each of the node_modules directories.
Read more >
Using yarn symlinks to share code between apps
Since the shared-code is not published to an npm repository it's not possible to lock in a certain version. This means that there's...
Read more >
Frequently Asked Questions (FAQ) - Rush.js
Each project folder remains self-contained (no blurring of package ... Make sure that no other NPM or NodeJS folders appear in your PATH...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found