You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: improve runtime validation for adapter-vercel (#14838)
* chore: improve runtime validation for adapter-vercel
* Update packages/adapter-vercel/utils.js
Co-authored-by: Simon H <[email protected]>
---------
Co-authored-by: Simon H <[email protected]>
* Whether to use [Edge Functions](https://vercel.com/docs/concepts/functions/edge-functions) (`'edge'`) or [Serverless Functions](https://vercel.com/docs/concepts/functions/serverless-functions) (`'nodejs18.x'`, `'nodejs20.x'` etc).
// If we're building on Vercel, we know that the version will be fine because Vercel
31
-
// provides Node (and Vercel won't provide something it doesn't support).
32
-
// Also means we're not on the hook for updating the adapter every time a new Node
33
-
// version is added to Vercel.
34
-
if(!process.env.VERCEL){
35
-
if(major<20||major>22){
36
-
thrownewError(
37
-
`Building locally with unsupported Node.js version: ${process.version}. Please use Node 20 or 22 to build your project, or explicitly specify a runtime in your adapter configuration.`
38
-
);
39
-
}
40
-
41
-
if(major%2!==0){
42
-
thrownewError(
43
-
`Unsupported Node.js version: ${process.version}. Please use an even-numbered Node version to build your project, or explicitly specify a runtime in your adapter configuration.`
`Unsupported Node.js version: ${process.version}. Please use Node 20 or 22 to build your project, or explicitly specify a runtime in your adapter configuration.`
`Unsupported runtime: ${key}. Supported runtimes are: ${valid_runtimes.join(', ')}. See the Node.js Version section in your Vercel project settings for info on the currently supported versions.`
0 commit comments