JavaScript BETA Azure功能异常

时间:2017-10-26 15:03:02

标签: javascript azure azure-functions

我创建了一个新的JavaScript timerTrigger。把它放在版本~1上,它执行得很好。

我将版本切换为BETA并再次运行并获得:

2017-10-26T14:17:55 Welcome, you are now connected to log-streaming service. 2017-10-26T14:17:57.938 Function started (Id=b196bcc3-c8ae-493e-84c7-9e037dba7141) 2017-10-26T14:17:58.565 Exception while executing function: Functions.Wrike. System.Private.CoreLib: One or more errors occurred. (Worker process with pid 7820 exited with code 1) (Worker process with pid 6964 exited with code 1) (Worker process with pid 6436 exited with code 1). Worker process with pid 7820 exited with code 1. 2017-10-26T14:17:58.907 Function completed (Failure, Id=b196bcc3-c8ae-493e-84c7-9e037dba7141, Duration=957ms)

这是我的index.js

module.exports = function (context, myTimer) {
    var timeStamp = new Date().toISOString();

    if(myTimer.isPastDue)
    {
        context.log('JavaScript is running late!');
    }
    context.log('JavaScript timer trigger function ran!', timeStamp);   

    context.done();
};

1 个答案:

答案 0 :(得分:2)

今天“测试版”中的一个常见问题是您的Node.js版本最终不正确。我们正在为此做一些改进,包括默认为8.4.0,以防你没有设置它,并在没有错误地设置错误时改进错误消息。

请确保您已将测试版中的Azure功能的Node.js版本设置为大于8.4.0。我们通常会尝试继续测试8.x的最新版本,并在8.x LTS上测试“GA”2.0。