uploadthing icon indicating copy to clipboard operation
uploadthing copied to clipboard

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

Open NaughtyDog6000 opened this issue 1 year ago • 3 comments

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

  • [X] I understand

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/[email protected]
npm error Found: [email protected]
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/[email protected]
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/[email protected]
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/[email protected]
npm error node_modules/@uploadthing/svelte
npm error   @uploadthing/svelte@"^7.0.2" from the root project
npm error
npm error Conflicting peer dependency: [email protected]
npm error node_modules/svelte
npm error   peer svelte@"^4.0.0" from @uploadthing/[email protected]
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

NaughtyDog6000 avatar Sep 19 '24 20:09 NaughtyDog6000

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

juliusmarminge avatar Sep 20 '24 07:09 juliusmarminge

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.

github-actions[bot] avatar Oct 01 '24 00:10 github-actions[bot]

Cc @t3dotgg do you know anyone who can verify?

markflorkowski avatar Oct 03 '24 19:10 markflorkowski

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?

AlanAcDz avatar Oct 11 '24 01:10 AlanAcDz