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

Support Node v20 in Vercel adapter #9408

Closed
1 task
shishkin opened this issue Dec 11, 2023 · 6 comments · Fixed by #9413
Closed
1 task

Support Node v20 in Vercel adapter #9408

shishkin opened this issue Dec 11, 2023 · 6 comments · Fixed by #9413
Labels
needs triage Issue needs to be triaged

Comments

@shishkin
Copy link
Contributor

Astro Info

Astro                    v4.0.3
Node                     v20.10.0
System                   macOS (arm64)
Package Manager          npm
Output                   static
Adapter                  none (it's @astrojs/vercel 6.0.1 in real deployment)
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Astro fails to deploy on Vercel with Node 20 runtime configured:

[20:32:36.245] 19:32:36 [build] Complete!
[20:32:36.315] Build Completed in /vercel/output [51s]
[20:32:36.519] Deploying outputs...
[20:32:36.529] Error: The following Serverless Functions contain an invalid "runtime":
[20:32:36.529]   - render (nodejs18.x). Learn More: https://vercel.com/guides/serverless-function-contains-invalid-runtime-error

In a local build, adapter warns about Node 20 not supported (due to this hardcoded list of supported version).

What's the expected result?

If there are no known issues, Node 20 should be added to the supported list.

Link to Minimal Reproducible Example

not reproducible on stackblitz, the issue is only on vercel

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Dec 11, 2023
@matthewp
Copy link
Contributor

Can you submit a PR for this? Thanks!

@jacobdalamb
Copy link
Contributor

jacobdalamb commented Dec 11, 2023

Node 20x is in beta currently in Vercel.

@shishkin
Copy link
Contributor Author

@matthewp Probably should have done it upfront. @jacobdalamb was first :)

@jacobdalamb yes, I have and got the error in the output as described above.

@jacobdalamb
Copy link
Contributor

jacobdalamb commented Dec 12, 2023

Adapter none (it's @astrojs/vercel 6.0.1 in real deployment)

I don't understand this part. Is @astrojs/vercel installed in your project?

@shishkin
Copy link
Contributor Author

Yes, I have @astrojs/[email protected] installed in my project. I think I ran astro info in a repo root instead of the web package.

@shishkin
Copy link
Contributor Author

@jacobdalamb your PR should fix the issue according to the runtime selection logic here. Once Node 20 is in the supported list, it should be used instead of defaulting to 18.

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

Successfully merging a pull request may close this issue.

3 participants