From b3bc6121843c0d835bf37f72d0371ec2850e5ca5 Mon Sep 17 00:00:00 2001 From: skyoct <764213885@qq.com> Date: Wed, 8 Nov 2023 11:09:23 +0800 Subject: [PATCH] fix(runtime): fix interceptor main func error (#1638) --- runtimes/nodejs/src/support/engine/function.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/runtimes/nodejs/src/support/engine/function.ts b/runtimes/nodejs/src/support/engine/function.ts index 77ed86dd67..32fd16d92d 100644 --- a/runtimes/nodejs/src/support/engine/function.ts +++ b/runtimes/nodejs/src/support/engine/function.ts @@ -124,6 +124,7 @@ export class CloudFunction { } function __next__() { + const exports = {} ${code} const __main__ = exports.main || exports.default if(!__main__) { throw new Error('FunctionExecError: main function not found') }