-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Yarn 2 PnP ERR_MODULE_NOT_FOUND in SvelteKit #1514
Comments
Is this issue still without a solution or workaround? |
Not for me at least. I'm still using the node-modules linker because of this. |
If possible I would like to stay with Yarn PnP but svelte-language-tools will be a blocker to that. Is there anything I can do to try to move this forward? I'd be happy to try to add the |
A |
Alright, I got a The main issue is that unfortunately it seems to require using an absolute path because it can't find I tried setting the I don't think that's tenable to add to the Here's the commit that I made to my own repository to add this change: Any advice on how to work around this problem? |
Thank you for taking on this! It's weird that only an absolute path will work. Have you perhaps tried to log out the working directory for node runtime? Is it possible to have it run in Obviously, having relative path working is the optimal situation, but if we have to use asbolute path, configuring it per project is not that bad. Btw, I'm personally a proponent for never committing editor related configs (like |
Good news, I managed to figure out how to make it work! I checked The issue was that I needed to change the flags. As it turns out I wanted to just say I very much appreciate pointing to the exact line in Anyways, I've opened a PR, well two actually (one here and one in Yarn SDKs)! |
That’s fantastic news!!! Thank you so much for your work! |
Describe the bug
The extension throws the following error with yarn 2 PnP and SvelteKit:
Reproduction
In a brand new skeleton svelte project, follow these steps: https://github.com/sveltejs/language-tools/tree/master/packages/svelte-vscode#usage-with-yarn-2-pnp.
Expected behaviour
The extension works as normal.
System Info
Which package is the issue about?
Svelte for VS Code
Additional Information, eg. Screenshots
I'm not sure this is correct, but I think the node backend shouldn't be using the internal module loader, as shown in the error message above.
To resolve it, I think it should be sufficient to be able to add
-r .pnp.cjs --loader .pnp.loader.mjs
generated by yarn, as shown in yarnpkg/berry#638 (comment).language-tools/packages/svelte-vscode/src/extension.ts
Line 102 in 5a6eba1
Hopefully, an option alongside
svelte.language-server.runtime
, likesvelte.language-server.runtimeArgs
should be sufficient for this.Other cases of people encountering this: #678 (comment).
The text was updated successfully, but these errors were encountered: