Skip to content

Commit

Permalink
[0.6.x] fix: autodetect nodejs runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz authored and f3l1x committed Apr 16, 2024
1 parent 4490bed commit 38713b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import {
download,
Lambda,
BuildV3,
PrepareCache
PrepareCache,
getNodeVersion
} from '@vercel/build-utils';
import {
getPhpFiles,
Expand Down Expand Up @@ -113,6 +114,7 @@ export const build: BuildV3 = async ({
}

console.log('🐘 Creating lambda');
const nodeVersion = await getNodeVersion(workPath);

const lambda = new Lambda({
files: {
Expand All @@ -123,7 +125,7 @@ export const build: BuildV3 = async ({
...runtimeFiles
},
handler: 'launcher.launcher',
runtime: 'nodejs18.x',
runtime: nodeVersion.runtime,
environment: {
NOW_ENTRYPOINT: entrypoint,
NOW_PHP_DEV: meta.isDev ? '1' : '0'
Expand Down

0 comments on commit 38713b0

Please sign in to comment.