rgossiaux / svelte-headlessui

Unofficial Svelte port of the Headless UI component library
https://svelte-headlessui.goss.io
MIT License
1.78k stars 96 forks source link

Sveltekit and Svelte 4 #145

Closed candidosales closed 1 year ago

candidosales commented 1 year ago

To be able to use the latest version, we have to upgrade to Svelte 4: https://twitter.com/sveltejs/status/1663964613879246854

Vercel Output log error:

[18:14:51.885] Running build in San Francisco, USA (West) – sfo1
[18:14:51.942] Cloning github.com/candidosales/****** (Branch: svelte-4, Commit: 8bc8721)
[18:14:51.951] Skipping build cache, deployment was triggered without cache.
[18:14:53.030] Cloning completed: 1.087s
[18:14:53.249] Running "vercel build"
[18:14:53.899] Vercel CLI 29.3.6
[18:14:54.592] Installing dependencies...
[18:14:55.656] npm ERR! code ERESOLVE
[18:14:55.659] npm ERR! ERESOLVE could not resolve
[18:14:55.660] npm ERR! 
[18:14:55.660] npm ERR! While resolving: @rgossiaux/svelte-headlessui@1.0.2
[18:14:55.660] npm ERR! Found: svelte@4.0.0-next.0
[18:14:55.660] npm ERR! node_modules/svelte
[18:14:55.661] npm ERR!   dev svelte@"^4.0.0-next.0" from the root project
[18:14:55.661] npm ERR!   peer svelte@"^3.54.0 || ^4.0.0-next.0" from @sveltejs/kit@1.20.0
[18:14:55.661] npm ERR!   node_modules/@sveltejs/kit
[18:14:55.661] npm ERR!     dev @sveltejs/kit@"^1.20.0" from the root project
[18:14:55.661] npm ERR!     peer @sveltejs/kit@"^1.0.0" from @sveltejs/adapter-auto@2.1.0
[18:14:55.661] npm ERR!     node_modules/@sveltejs/adapter-auto
[18:14:55.662] npm ERR!       dev @sveltejs/adapter-auto@"^2.1.0" from the root project
[18:14:55.662] npm ERR!     1 more (@sveltejs/adapter-vercel)
[18:14:55.662] npm ERR!   6 more (@sveltejs/vite-plugin-svelte, ...)
[18:14:55.662] npm ERR! 
[18:14:55.662] npm ERR! Could not resolve dependency:
[18:14:55.662] npm ERR! peer svelte@"^3.44.0" from @rgossiaux/svelte-headlessui@1.0.2
[18:14:55.662] npm ERR! node_modules/@rgossiaux/svelte-headlessui
[18:14:55.663] npm ERR!   dev @rgossiaux/svelte-headlessui@"^1.0.2" from the root project
[18:14:55.663] npm ERR! 
[18:14:55.663] npm ERR! Conflicting peer dependency: svelte@3.59.1
[18:14:55.663] npm ERR! node_modules/svelte
[18:14:55.663] npm ERR!   peer svelte@"^3.44.0" from @rgossiaux/svelte-headlessui@1.0.2
[18:14:55.663] npm ERR!   node_modules/@rgossiaux/svelte-headlessui
[18:14:55.663] npm ERR!     dev @rgossiaux/svelte-headlessui@"^1.0.2" from the root project
[18:14:55.663] npm ERR! 
[18:14:55.663] npm ERR! Fix the upstream dependency conflict, or retry
[18:14:55.664] npm ERR! this command with --force or --legacy-peer-deps
[18:14:55.664] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
[18:14:55.664] npm ERR! 
[18:14:55.664] npm ERR! 
[18:14:55.664] npm ERR! For a full report see:
[18:14:55.664] npm ERR! /vercel/.npm/_logs/2023-05-31T22_14_55_050Z-eresolve-report.txt
[18:14:55.665] 
[18:14:55.665] npm ERR! A complete log of this run can be found in:
[18:14:55.665] npm ERR!     /vercel/.npm/_logs/2023-05-31T22_14_55_050Z-debug-0.log
[18:14:55.685] Error: Command "npm install" exited with 1
[18:14:55.816] BUILD_UTILS_SPAWN_1: Command "npm install" exited with 1

I would like to keep using your lib πŸ˜ƒ

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
svelte-headlessui ❌ Failed (Inspect) May 31, 2023 11:25pm
candidosales commented 1 year ago

@rgossiaux, Could you review it? :)

candidosales commented 1 year ago

@thenbe and @davepar , could you review it?

candidosales commented 1 year ago

:(

thenbe commented 1 year ago

@candidosales Hi! tbh I've switched to using https://github.com/CaptainCodeman/svelte-headlessui for my headless-ui needs as this project has stopped receiving updates the past year.

candidosales commented 1 year ago

@thenbe , Thanks! I going to take a look πŸ˜ƒ . The project received the update 2 days ago, I'll wait :)

rgossiaux commented 1 year ago

Thanks for the PR! I hadn't been following Svelte news for a while and this brought to my attention that I would need to make sure this library is compatible with Svelte 4.

I just performed the Kit migration myself in #148. As for Svelte 4, I'll need to do some testing to make sure everything still works correctly, but assuming there are no issues (not a guarantee with breaking changes as this library does some pretty complicated stuff internally) I'll mark it as compatible soon.