sveltejs / vite-plugin-svelte

Svelte plugin for http://vitejs.dev/
MIT License
864 stars 105 forks source link

Incompatible engine #800

Closed howesteve closed 1 year ago

howesteve commented 1 year ago

Describe the bug

I don't know what happened here after package upgrades, but it seems this package does not accept node 19.

gargamel::~ $ pnpm up --latest
 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

This error happened while installing a direct dependency of /home/howe/mnt/private/projects/whenileave/client

Your Node version is incompatible with "registry.npmjs.org/@sveltejs/vite-plugin-svelte/3.0.0".

Expected version: ^18.0.0 || >=20
Got: v19.8.1

This is happening because the package's manifest has an engines.node field specified.
To fix this issue, install the required Node version.
Progress: resolved 18, reused 18, downloaded 0, added 0
gargamel::~ $ node --version                               
v19.8.1

Is there any specific reason for ^18.0.0 || >=20? Why is node 19 excluded?

Thanks.

Reproduction URL

https://github.com/sveltejs/vite-plugin-svelte/issues

Reproduction

No response

Logs

-

System Info

Linux gargamel 6.5.9-arch2-1 #1 SMP PREEMPT_DYNAMIC Thu, 26 Oct 2023 00:52:20 +0000 x86_64 GNU/Linux
dominikg commented 1 year ago

because it was already EOL at the time of release of 3.0.0. You should not use it. we don't test with this release.

dominikg commented 1 year ago

it is also not supported by vite5, which is required

howesteve commented 1 year ago

Ok, seems odd to me to support version 18 but not 19 from any packages. If vite already restricts it, I see no point in repeating the restriction in this package. But ok, I'll try to update the node version in all VMs running this code. Thank you for the prompt answer.