-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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-kit caching with yarn PNP #5353
Comments
Just to add the quick way to turn PNP off
This gets around the above but means more disk space used |
Not sure if they are plans to support this per https://kit.svelte.dev/faq#integrations-how-do-i-use-with-yarn-how-do-i-use-with-yarn-3 |
I wrote that (the yarn 3 part) One thing that could be done to make things better is to add the .yarn directory into the defaults passed to vite
|
Oh sorry I didn't know that 😅 I'm not sure how yarn pnp affects |
It doesn't fix the .svelte-kit caching issue (I'm not sure how to fix that outside of just deleting the cache directory each time before running) |
Awhile back I was trying to get sveltekit to work with yarn berry but ran into the same issue. I believe this PR will fix it on yarn's side: yarnpkg/berry#3889. The third issue mentioned in that PR (3783) looks like a very similar error we are getting here, but I could be wrong. |
is there anything kit can/should do here? Looks like yarn pnp still has issues to solve on their end. The fs.allow setting can be provided by pnp users in config. Automatic detection would be something either for vite or a supporting vite-plugin-yarn-pnp. |
Using yarn 3.2.2 which included the pr I had mentioned above the issue still persists. |
I think this has been fixed in a more recent version of yarn. I have been able to successfully use sveltekit with the current version of yarn (4.1.1). There is an issue with the use of prettier and plugins (which shows up in sveltekit), I was able to patch that in prettier though. See wooorm/import-meta-resolve#26 and prettier/prettier#15513. |
Still reproduced in yarn 4.4.0 with next error error when starting dev server: |
Describe the bug
Overview
Previously there was some discussion over the use of yarn PNP / berry here
The main advantage of PNP is that it allows you to reference packages from a global cache on the disk (similar to pnpm except without the disk hard links). So it saves on disk space with the global cache setting enabled.
With yarn 3.2.1 PNP this sort of half works.
If you install and set everything up then it works fine on the first run, but then fails on the follow up run due to something related to the .svelte-kit caching
Reproduction
Example
First setup a new svelte kit app (skeleton)
yarn create svelte myapp cd myapp
Switch to yarn berry with PNP
Add the following to the config under the kit section of svelte.config.js
Try yarn dev
At this point things work on the first run
On follow up runs this error shows up
If I delete the
.svelte-kit
directory then it works fine again for a first run.Logs
No response
System Info
Severity
annoyance
Additional Information
No response
The text was updated successfully, but these errors were encountered: