-
Notifications
You must be signed in to change notification settings - Fork 108
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
11:03:30 PM [vite-plugin-svelte] WARNING: The following packages use a svelte resolve configuration in package.json that has conflicting results and is going to cause problems future. [email protected] Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#conflicts-in-svelte-resolve for details. #562
Comments
Guessing you're using Svelte 5? |
I get a warning, saying I have a resolve problem. Can you please read the documentation, and fix my problem? No, I can't share any configuration or package.json to help narrow the problem down. |
@vlrevolution can you please provide a way to reproduce this error? |
I also get this warning. This particular warning is only present in And if you don't have |
Thanks
…On Wed, May 29, 2024, 19:39 Miniontoby ***@***.***> wrote:
I also get this warning.
It is because this package still has an svelte key in the root of the
package.json:
Using the svelte field in package.json to point at .svelte source files
is deprecated and you must use a svelte export condition
<https://nodejs.org/api/packages.html#conditional-exports>.
vite-plugin-svelte 3 still resolves it as a fallback, but in a future major
release this is going to be removed and without exports condition resolving
the library is going to fail.
Source
<https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition>
So basically what vite wants you to do is to make use of the exports -> .
-> svelte key. And I can see that you have already done that.
They also say you can keep the svelte field in addition to the exports
condition for backwards compatibility, however they didn't write an
check/if statement to see if you already have the exports condition, so it
is basically no problem at the moment, but it is more like a bug at vite...
If you want to get rid of the warning you can remove the svelte field in
the root of the package.json file inside the
node_modules/svelte-dnd-action/ folder.
------------------------------
Btw if you want to reproduce, just create a new project (the vite version
I am using is 4.5.0), add the package (import it also of course) and then
run vite build and you will see the warning popping up:
PS C:\MyProjects\MyProject> npm run build
> ***@***.*** build
> vite build
vite v4.5.2 building SSR bundle for production...
✓ 123 modules transformed.
11:22:29 [vite-plugin-svelte] WARNING: The following packages use a svelte resolve configuration in package.json that has conflicting results and is going to cause problems future.
***@***.***
Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#conflicts-in-svelte-resolve for details.
vite v4.5.2 building for production...
✓ 136 modules transformed.
11:22:34 [vite-plugin-svelte] WARNING: The following packages use a svelte resolve configuration in package.json that has conflicting results and is going to cause problems future.
***@***.***
Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#conflicts-in-svelte-resolve for details.
.svelte-kit/output/client/_app/version.json 0.03 kB │ gzip: 0.05 kB
.svelte-kit/output/client/.vite/manifest.json 6.94 kB │ gzip: 0.96 kB
(...)
—
Reply to this email directly, view it on GitHub
<#562 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE4OZC56OU7T3AVCGSIMUZLZEWO3HAVCNFSM6AAAAABGRUKGH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZWHE4DCNJZGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Oke here is some information about the warning:
Seems like we should just upgrade to vite-plugin-svelte@3 on our own projects/packages! P.s. if you don't have that installed, then it might be @sveltejs/kit that needs to be updated to version 2! |
@Miniontoby thanks for investigating this. I am not sure if I need to do something about this or not 😅 |
Yeah, you don't have to do anything here. People who get this error just need to update their packages! I will remove my other comments, to avoid more confusion for others, you may also remove the ones that you posted after my initial comment |
Thanks. Done |
Getting a warning:
11:03:30 PM [vite-plugin-svelte] WARNING: The following packages use a svelte resolve configuration in package.json that has conflicting results and is going to cause problems future.
[email protected]
Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#conflicts-in-svelte-resolve for details.
is it fixable?
The text was updated successfully, but these errors were encountered: