Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can you please update to Vite 3? #324

Closed
kevinrenskers opened this issue Jul 28, 2022 · 9 comments
Closed

Can you please update to Vite 3? #324

kevinrenskers opened this issue Jul 28, 2022 · 9 comments

Comments

@kevinrenskers
Copy link

I can't update my project's main dependency SvelteKit to the latest version as it depends on Vite 3, and since vite-plugin-markdown depends on Vite 2, that gives a conflict.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [projectname]@0.0.1
npm ERR! Found: vite@3.0.3
npm ERR! node_modules/vite
npm ERR!   peer vite@"^3.0.0" from @sveltejs/kit@1.0.0-next.396
npm ERR!   node_modules/@sveltejs/kit
npm ERR!     dev @sveltejs/kit@"next" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev vite-plugin-markdown@"^2.0.2" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite@2.9.14
npm ERR! node_modules/vite
npm ERR!   peer vite@"^2.0.0" from vite-plugin-markdown@2.0.2
npm ERR!   node_modules/vite-plugin-markdown
npm ERR!     dev vite-plugin-markdown@"^2.0.2" from the root project
@jchalex
Copy link

jchalex commented Aug 4, 2022

+1

@jchalex
Copy link

jchalex commented Aug 4, 2022

npm ERR! Found: vite@3.0.4
npm ERR! node_modules/vite
npm ERR!   dev vite@"^3.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.0.0" from vite-plugin-markdown@2.0.2
npm ERR! node_modules/vite-plugin-markdown
npm ERR!   dev vite-plugin-markdown@"*" from the root project

@hmsk
Copy link
Owner

hmsk commented Aug 4, 2022

@hmsk hmsk closed this as completed Aug 4, 2022
@kevinrenskers
Copy link
Author

Thanks!

@kevinrenskers
Copy link
Author

I think you could maybe just use * as the version number to solve other problems. For example SvelteKit now depends on Vite ^3.1.0-beta.1 which is causing conflicts with vite-plugin-markdown:

npm ERR! Found: vite@3.1.0-beta.1
npm ERR! node_modules/vite
npm ERR!   peer vite@"^3.1.0-beta.1" from @sveltejs/kit@1.0.0-next.454
npm ERR!   node_modules/@sveltejs/kit
npm ERR!     dev @sveltejs/kit@"next" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! dev vite-plugin-markdown@"^2.0.2" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: vite@3.0.9
npm ERR! node_modules/vite
npm ERR!   peer vite@"^2.0.0 || ^3.0.0" from vite-plugin-markdown@2.1.0
npm ERR!   node_modules/vite-plugin-markdown
npm ERR!     dev vite-plugin-markdown@"^2.0.2" from the root project

@arrowtype
Copy link

arrowtype commented Sep 3, 2022

Sorry, I’m kind of a JS noob, and trying to set up markdown support in a brand-new SvelteKit app (Svelte 3.44.0)... @kevinrenskers is there a current workaround for this, or should I downgrade to an older version of Svelte? Thanks for any tips, if you have them!

@kevinrenskers
Copy link
Author

I don't think this is related to Svelte at all, it's just SvelteKit that depends on Vite.
But yes, you can use the --force flag when installing or upgrading packages with NPM.

@arrowtype
Copy link

Thanks for the quick reply! That’s a helpful tip! Seems like it will work, once I piece together the rest of this markdown import.

My current guess is that Svelte kit calls for vite 3.1.0-beta.1, and this plugin calls for vite 2.0.0 or 3.0.0... maybe? I could totally be misinterpreting the error message...

@hmsk
Copy link
Owner

hmsk commented Sep 3, 2022

Basically I'm intending to give proper versions to express which version this module would support, so * is aggressive despite I don't wanna support 0.x, 1.x

Anyways I think even * doesn't include beta versions of vite. So should wait for SvelteKit specifies non-prerelease vite while we use --force.
https://semver.npmjs.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants