AzureツールをVSコードとノード8.9.3でローカルで実行しています。Typescript 2.6.2 Azure関数は "func new "私は"scriptFile": "index.ts",
をfunction.jsonに追加して、これまでのところそれを取得しなければなりませんでした。そうでなければ、メインスクリプトが見つからないと訴えました。他にローカルAzure関数ローカルでTypeScriptCompiler.CompileAsync()の実行中に "指定されたファイルが見つかりません"
{
"id": "952c0946-bd72-49e7-9f25-c3a8ba8ca236",
"requestId": "954642f2-9b17-43a2-b26f-b63615360301",
"statusCode": 500,
"errorCode": 0,
"message": "Exception while executing function: Functions.CreateAccount -> The system cannot find the file specified",
"errorDetails": "Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception while executing function: Functions.CreateAccount ---> System.ComponentModel.Win32Exception : The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Microsoft.Azure.WebJobs.Script.Description.Node.TypeScript.TypeScriptCompiler.CompileAsync(String inputFile,TypeScriptCompilationOptions options)
at async Microsoft.Azure.WebJobs.Script.Description.Node.TypeScript.TypeScriptCompilation.CompileAsync(??)
at async Microsoft.Azure.WebJobs.Script.Description.Node.TypeScript.TypeScriptCompilation.CompileAsync(??)
at async Microsoft.Azure.WebJobs.Script.Description.Node.TypeScript.TypeScriptCompilationService.GetFunctionCompilationAsync(FunctionMetadata functionMetadata)
at async Microsoft.Azure.WebJobs.Script.Description.ConditionalJavaScriptCompilationService.GetFunctionCompilationAsync(FunctionMetadata functionMetadata)
at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.CompileAndTraceAsync(LogTargets logTargets,Boolean throwOnCompilationError,Boolean suppressCompilationSummary)
at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.CreateFunctionTarget(CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.Description.FunctionLoader`1.GetFunctionTargetAsync[T](Int32 attemptCount)
at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.GetFunctionTargetAsync()
at async Microsoft.Azure.WebJobs.Script.Description.NodeFunctionInvoker.InvokeCore(Object[] parameters,FunctionInvocationContext context)
at async Microsoft.Azure.WebJobs.Script.Description.FunctionInvokerBase.Invoke(Object[] parameters)
at async Microsoft.Azure.WebJobs.Host.Executors.VoidTaskMethodInvoker`2.InvokeAsync[TReflected,TReturnType](TReflected instance,Object[] arguments)
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker`2.InvokeAsync[TReflected,TReturnValue](Object instance,Object[] arguments)
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker,ParameterHelper parameterHelper,CancellationTokenSource timeoutTokenSource,CancellationTokenSource functionCancellationTokenSource,Boolean throwOnTimeout,TimeSpan timerInterval,IFunctionInstance instance)
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance,ParameterHelper parameterHelper,TraceWriter traceWriter,CancellationTokenSource functionCancellationTokenSource)
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)
End of inner exception
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)
at async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.TryExecuteAsync(IFunctionInstance functionInstance,CancellationToken cancellationToken)
at Microsoft.Azure.WebJobs.Host.Executors.ExceptionDispatchInfoDelayedException.Throw()
at async Microsoft.Azure.WebJobs.JobHost.CallAsync(??)
at async Microsoft.Azure.WebJobs.Script.ScriptHost.CallAsync(String method,Dictionary`2 arguments,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.WebHost.WebScriptHostManager.HandleRequestAsync(FunctionDescriptor function,HttpRequestMessage request,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.Host.FunctionRequestInvoker.ProcessRequestAsync(HttpRequestMessage request,CancellationToken cancellationToken,WebScriptHostManager scriptHostManager,WebHookReceiverManager webHookReceiverManager)
at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.<>c__DisplayClass3_0.<ExecuteAsync>b__0(??)
at async Microsoft.Azure.WebJobs.Extensions.Http.HttpRequestManager.ProcessRequestAsync(HttpRequestMessage request,Func`3 processRequestHandler,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.WebHost.Controllers.FunctionsController.ExecuteAsync(HttpControllerContext controllerContext,CancellationToken cancellationToken)
at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
at async System.Web.Http.Dispatcher.HttpControllerDispatcher.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.WebScriptHostHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
at async Microsoft.Azure.WebJobs.Script.WebHost.Handlers.SystemTraceHandler.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)
at async System.Web.Http.HttpServer.SendAsync(HttpRequestMessage request,CancellationToken cancellationToken)"
}
活字体が正常に動作します:存在しない路線で適切404ingが、私はポストマンとそれに投稿するか、ブラウザから取得する場合には、これを放出する - しかし、今ではそのすべての登録に成功しているように見えるんもの。他の誰かがこのエラーに当たった?どうすれば修正できますか?
感謝を。多分あなたは正しいと思いますが、タイプスクリプトが動作することを示すいくつかの兆候があります:1)[既知の問題のドキュメント](https://github.com/Azure/azure-webjobs-sdk-script/wiki/Azure-Functions-ランタイム2.0の既知の問題#機能ギャップ)は、Typescript *がまだマイグレーションされていないと言います。 2)[この記事](https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#publish)は、2.xランタイムにオプトインする必要があると言います。 3)例外のスタックトレースには、typescriptのコンパイルが含まれているので、何をする必要があるか分かっているようです。 –
ああ、4)azure cli func newは、言語選択としてタイスクリプトを提供します。 –
機能チームメンバーはこちら。関数はプレビューでTypeScriptをサポートしていますが、これについては説明しません。独自のtsconfig.jsonを提供することはできませんので、まったく正しい設定をしないようにしてください。ちょっと面倒です。私の経験上、事前にJSに移り、自分で設定を制御するほうが良いです。全体的に私は、TSを蒸散することは、簡潔さのためにより簡単であると考えています。 –