Update svelte to v5
Describe the bug
Using the default vite template to create a svelte app (as shown in the maptiler svelte tutorial) it will use svelte v5. However, this package still depends on svelte v4.
This also means that if the user tries to do the maptiler svelte tutorial and the maptiler geocoding tutorial they will run into this conflict:
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @maptiler/[email protected]
npm warn Found: [email protected]
npm warn node_modules/svelte
npm warn dev svelte@"^5.19.6" from the root project
npm warn 3 more (@sveltejs/vite-plugin-svelte, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peerOptional svelte@"^4.2" from @maptiler/[email protected]
npm warn node_modules/@maptiler/geocoding-control
npm warn @maptiler/geocoding-control@"^2.1.6" from the root project
npm warn
npm warn Conflicting peer dependency: [email protected]
npm warn node_modules/svelte
npm warn peerOptional svelte@"^4.2" from @maptiler/[email protected]
npm warn node_modules/@maptiler/geocoding-control
npm warn @maptiler/geocoding-control@"^2.1.6" from the root project
and requires the user to do a dependency override in package.json or use --force.
To Reproduce
npm create vite my-svelte-map -- --template svelte
npm install
npm install @maptiler/sdk
npm install @maptiler/geocoding-control
Expected behavior
@maptiler/sdk and @maptiler/geocoding-control both are compatible with the same svelte version.
Screenshots
Additional context Add any other context about the problem here.
Hello, sorry, for the long time to reply, we will update this soon, thanks for reporting.
Hi @niderhoff,
At present upgrading the module from Svelte v4 to Svelte v5 involves a lot more work than planned, even with the sv codemod.
In the meantime I'd recommend sticking to Svelte v4 or simply installing with --legacy-peer-deps and using the pre-compiled vanilla module instead of the Svelte component.
The work regarding this module has been added to our backlog and will be executed when we have sufficient bandwidth.
Thankyou for flagging this! 🙏
cc @petr-hajek
See for further info https://github.com/maptiler/maptiler-geocoding-control/pull/88