pingdotgg / uploadthing

File uploads for modern web devs
https://uploadthing.com
MIT License
4.23k stars 314 forks source link

[misc]: @uploadthing/svelte support for svelte 5 #967

Closed NaughtyDog6000 closed 1 month ago

NaughtyDog6000 commented 1 month ago

I understand that this issue may be closed if it should be filed in another category

My issue

When creating a sveltekit project using svelte 5, installing @uploadthing/svelte fails due to it requiring svelte 4. When I used --force to install the package it worked fine in my testing.

Steps to reproduce:

 npm create svelte@latest my-app
 - Skeleton project
 - TS
 - additional options Svelte 5 preview

cd my-app
npm install uploadthing @uploadthing/svelte

Example error:

npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @uploadthing/svelte@7.0.2
npm error Found: svelte@5.0.0-next.254
npm error node_modules/svelte
npm error   svelte@"^5.0.0-next.254" from the root project
npm error   peer svelte@"^4.0.0 || ^5.0.0-next.0" from @sveltejs/kit@2.5.28
npm error   node_modules/@sveltejs/kit
npm error     dev @sveltejs/kit@"^2.0.0" from the root project
npm error     peer @sveltejs/kit@"^2.0.0" from @sveltejs/adapter-auto@3.2.5
npm error     node_modules/@sveltejs/adapter-auto
npm error       dev @sveltejs/adapter-auto@"^3.0.0" from the root project
npm error     1 more (sveltekit-superforms)
npm error   10 more (@sveltejs/vite-plugin-svelte, ...)
npm error
npm error Could not resolve dependency:
npm error peer svelte@"^4.0.0" from @uploadthing/svelte@7.0.2
npm error node_modules/@uploadthing/svelte
npm error   @uploadthing/svelte@"^7.0.2" from the root project
npm error
npm error Conflicting peer dependency: svelte@4.2.19
npm error node_modules/svelte
npm error   peer svelte@"^4.0.0" from @uploadthing/svelte@7.0.2
npm error   node_modules/@uploadthing/svelte
npm error     @uploadthing/svelte@"^7.0.2" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error C:\Users\*redacted*\AppData\Local\npm-cache\_logs\2024-09-19T20_16_44_933Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\*redacted*\AppData\Local\npm-cache\_logs\2024-09-19T20_16_44_933Z-debug-0.log
juliusmarminge commented 1 month ago

do we have some Svelte expert that can help us confirm if we're using any weird stuff or is it safe to bump the peer dep? cc @markflorkowski

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had any activity for 10 days. It will be closed in 5 days if no further activity occurs.

markflorkowski commented 1 month ago

Cc @t3dotgg do you know anyone who can verify?

AlanAcDz commented 1 month ago

I have made a PR to close this.

Also, I could start working on a full svelte 5 upgrade and maybe have it behind a next flag until svelte 5 becomes stable, or should I wait?