Основные инструменты функций Azure выбрасывают ошибку с функцией по умолчанию: не удается найти./ azurefunctions / функции.JS


Я переустановил Windows 10 несколько недель назад, и мне пришлось переустановить все инструменты. Не будучи профессионалом, я просто пошел с последними версиями всего и сегодня обновил основные инструменты.

В настоящее время я нахожусь в

  • узел: 8.11.1
  • Основные Инструменты: 1.0.11

Я только что создал новое приложение функции и функцию и получаю следующую ошибку, когда я пытаюсь вызвать URI через Postman.

{
    "id": "53b6098d-69e4-45a1-9f0f-2bec6f965435",
    "requestId": "ca41a391-35ca-440f-a78b-007473b9ee5a",
    "statusCode": 500,
    "errorCode": 0,
    "message": "Exception while executing function: Functions.HttpTriggerJS -> One or more errors occurred. -> Error: Cannot find module '../azurefunctions/functions.js'n    at Function.Module._resolveFilename (module.js:469:15)n    at Function.Module._load (module.js:417:25)n    at Module.require (module.js:497:17)n    at require (internal/module.js:20:19)n    at eval (eval at compileFunc (C:\Users\giraffeslacks\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:34:28), <anonymous>:1:23)n    at compileFunc (C:\Users\giraffeslacks\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:35:16)",
    "errorDetails": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Functions.HttpTriggerJS ---> System.AggregateException : One or more errors occurred. ---> Error: Cannot find module '../azurefunctions/functions.js'n    at Function.Module._resolveFilename (module.js:469:15)n    at Function.Module._load (module.js:417:25)n    at Module.require (module.js:497:17)n    at require (internal/module.js:20:19)n    at eval (eval at compileFunc (C:\Users\giraffeslacks\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:34:28), <anonymous>:1:23)n    at compileFunc (C:\Users\giraffeslacks\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:35:16)rn   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)rn   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout,CancellationToken cancellationToken)rn   at EdgeJs.Edge.Func(String code)rn   at Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.get_GlobalInitializationFunc()rn   at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.InitializeAsync()rn   at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.InvokeCore(Object[] parameters,FunctionInvocationContext context)rn   at async Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters)rn   at async Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker`2.InvokeAsync[TReflected,TReturnType](TReflected instance,Object[] arguments)rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`2.InvokeAsync[TReflected,TReturnValue](Object instance,Object[] arguments)rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker,ParameterHelper parameterHelper,CancellationTokenSource timeoutTokenSource,CancellationTokenSource functionCancellationTokenSource,Boolean throwOnTimeout,TimeSpan timerInterval,IFunctionInstance instance)rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource)rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)rn---> (Inner Exception #0) System.Exception : Error: Cannot find module '../azurefunctions/functions.js'n    at Function.Module._resolveFilename (module.js:469:15)n    at Function.Module._load (module.js:417:25)n    at Module.require (module.js:497:17)n    at require (internal/module.js:20:19)n    at eval (eval at compileFunc (C:\Users\giraffeslacks\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:34:28), <anonymous>:1:23)n    at compileFunc (C:\Users\giraffeslacks\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\edge\double_edge.js:35:16)<---rn rn   End of inner exceptionrn   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)rn   at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance,CancellationToken cancellationToken)rn   at Microsoft.Azure.WebJobs.Host.Executors.ExceptionDispatchInfoDelayedException.Throw()rn   at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??)rn   at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary`2 arguments,CancellationToken cancellationToken)rn   at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken)rn   at async Microsoft.Azure.WebJobs.Script.Host.FunctionRequestInvoker.ProcessRequestAsync(HttpRequestMessage request,CancellationToken cancellationToken,WebScriptHostManager scriptHostManager,WebHookReceiverManager webHookReceiverManager)rn   at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??)rn   at async Microsoft.Azure.WebJobs.Extensions.Http.HttpRequestManager.ProcessRequestAsync(HttpRequestMessage request,Func`3 processRequestHandler,CancellationToken cancellationToken)rn   at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ExecuteAsync(HttpControllerContext controllerContext,CancellationToken cancellationToken)rn   at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)rn   at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)rn   at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)rn   at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)rn   at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)"
}
1 2

1 ответ:

Похоже, это ошибка в последнем инструменте ядра функций v1. 0. 11.

Я установить его через npm в мою сторону, и воспроизвести ошибку после запуска JS httptrigger (шаблон).

Ошибка, по-видимому, возникает только при использовании триггера js, так как при создании js blobtrigger возникает та же ошибка. Для c#, тест на httptrigger и blobtrigger, оба работают.

Я открыл проблему на github и ждал ответа команды Azure.