Skip to content

Add support for Vite 5 #11062

@tonprince

Description

@tonprince

Describe the problem

Please add support for Vite 5. When updating to version 5, I got an error when running npm i with the latest Sveltekit version:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @sveltejs/[email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vite
npm ERR!   dev vite@"^5.0.0" from the root project
npm ERR!   peerOptional vite@"^3.0.0 || ^4.0.0 || ^5.0.0" from [email protected]
npm ERR!   node_modules/vitefu
npm ERR!     vitefu@"^0.2.4" from @sveltejs/[email protected]
npm ERR!     node_modules/@sveltejs/kit/node_modules/@sveltejs/vite-plugin-svelte
npm ERR!       @sveltejs/vite-plugin-svelte@"^2.5.0" from @sveltejs/[email protected]
npm ERR!       node_modules/@sveltejs/kit
npm ERR!         dev @sveltejs/kit@"^1.27.6" from the root project
npm ERR!         1 more (@sveltejs/adapter-vercel)
npm ERR!       1 more (@sveltejs/vite-plugin-svelte-inspector)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^4.0.0" from @sveltejs/[email protected]
npm ERR! node_modules/@sveltejs/kit
npm ERR!   dev @sveltejs/kit@"^1.27.6" from the root project
npm ERR!   peer @sveltejs/kit@"^1.5.0" from @sveltejs/[email protected]
npm ERR!   node_modules/@sveltejs/adapter-vercel
npm ERR!     dev @sveltejs/adapter-vercel@"^3.0.3" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/vite
npm ERR!   peer vite@"^4.0.0" from @sveltejs/[email protected]
npm ERR!   node_modules/@sveltejs/kit
npm ERR!     dev @sveltejs/kit@"^1.27.6" from the root project
npm ERR!     peer @sveltejs/kit@"^1.5.0" from @sveltejs/[email protected]
npm ERR!     node_modules/@sveltejs/adapter-vercel
npm ERR!       dev @sveltejs/adapter-vercel@"^3.0.3" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Describe the proposed solution

Update Sveltekit and adapters to support latest release of Vite 5.

Alternatives considered

No response

Importance

nice to have

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions