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

Clamp to valid Vercel Node versions #2819

Open
1 task done
cjpearson opened this issue Oct 29, 2024 · 0 comments
Open
1 task done

Clamp to valid Vercel Node versions #2819

cjpearson opened this issue Oct 29, 2024 · 0 comments
Labels
enhancement New feature or request preset:vercel

Comments

@cjpearson
Copy link
Contributor

Describe the feature

The Vercel preset currently sets its runtime node version based on the version of node used to build the application. https://github.com/unjs/nitro/blob/v2/src/presets/vercel/utils.ts#L19 This caused an issue when updating from Node 20 to 22 (the LTS recently changed) because Vercel does not support Node 22.

What do you think about clamping the value to valid versions? So if you build with v22 or v23, v20 will be used as the default for the runtime?

Alternatively, maybe follow the same rules as Vercel does with the engine field? I was originally a bit confused with the invalid runtime error because I assumed those rules would apply (and we have >= 20 in our engines), but Nitro setting the runtime takes precedence.

Additional information

  • Would you be willing to help implement this feature?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request preset:vercel
Projects
None yet
Development

No branches or pull requests

2 participants