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

Issues with deployment on vercel platform #212

Open
finfin opened this issue Jan 3, 2025 · 0 comments
Open

Issues with deployment on vercel platform #212

finfin opened this issue Jan 3, 2025 · 0 comments

Comments

@finfin
Copy link

finfin commented Jan 3, 2025

There are two issues when I try to deploy on vercel,

  1. Vercel defaults to node v22, but serverless function did not support v22, need to change the node version.
[17:13:25.719] 09:13:25 [build] Rearranging server assets...
[17:13:25.731] 09:13:25 [@astrojs/sitemap] `sitemap-index.xml` created at `.vercel/output/static`
[17:13:25.731] 09:13:25 [WARN] [@astrojs/vercel/serverless] 
[17:13:25.732] 	The local Node.js version (22) is not supported by Vercel Serverless Functions.
[17:13:25.732] 	Your project will use Node.js 18 as the runtime instead.
[17:13:25.732] 	Consider switching your local version to 18.
[17:13:25.732] 
[17:13:25.732] 09:13:25 [@astrojs/vercel/serverless] Bundling function ../../_functions/entry.mjs
[17:13:28.772] 09:13:28 [build] Waiting for integration "@astrojs/vercel/serverless", hook "astro:build:done"...
[17:13:29.792] 09:13:29 [build] Server built in 15.24s
[17:13:29.792] 09:13:29 [build] Complete!
[17:13:29.845] Done in 30.38s.
[17:13:48.666] Build Completed in /vercel/output [2m]
[17:13:49.332] Deploying outputs...
[17:13:49.670] Error: The following Serverless Functions contain an invalid "runtime":
[17:13:49.672]   - _render (nodejs18.x). Learn More: https://vercel.com/guides/serverless-function-contains-invalid-runtime-error
[17:13:50.150] 

solution: add following to package.json will solve this error, reference

"engines": {
    "node": "22.x"
  }
  1. Vercel hobby(free) plan only supports up to 12 serverless function, which will show following errors
[17:06:33.644] Deploying outputs...
[17:06:49.568] Error: No more than 12 Serverless Functions can be added to a Deployment on the Hobby plan. Create a team (Pro plan) to deploy more. Learn More: https://vercel.link/function-count-limit
[17:06:50.160] 

possible solution: add some note in readme

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

1 participant