バージョン
- OS: macOS Catalina 10.15.7
Azure Functions Core Tools: 3.0.3785- node: 14.17.5
遭遇したエラー
Value cannot be null. (Parameter 'provider')
$ func start Azure Functions Core Tools Core Tools Version: 3.0.3785 Commit hash: db6fe71b2f05d09757179d5618a07bba4b28826f (64-bit) Function Runtime Version: 3.2.0.0 [2021-10-01T13:16:19.680Z] Cannot create directory for shared memory usage: /dev/shm/AzureFunctions [2021-10-01T13:16:19.680Z] System.IO.FileSystem: Access to the path '/dev/shm/AzureFunctions' is denied. Operation not permitted. [2021-10-01T13:16:20.590Z] A host error has occurred during startup operation '974818a2-159a-4925-a571-4d4330134e2b'. [2021-10-01T13:16:20.590Z] Microsoft.Azure.WebJobs.Script: Did not find functions with language [node]. Value cannot be null. (Parameter 'provider')
エラー原因
yarn buildせずにfunc startしていた
誤
function.jsonを下記のように設定しfunc start
//function.json
{
//...
"scriptFile": "../QueueTrigger/index.ts"
}
正
function.jsonを下記のように設定し、yarn build後にfunc start
{
//...
"scriptFile": "../dist/QueueTrigger/index.js"
}
ハマった事
Value cannot be null. (Parameter 'provider')についてはいくつも issue が上がっており、総じてExtensionBundle起因するエラー、解消方法は、host.jsonからextensionBundleを削除、というものだった。今回のケースでは
ExtensionBundleとは関連はなかった にも関わらず、上記の issue で示されている work around で試行錯誤してしまった。
解決のきっかけ
- JavaScript/QueueTrigger ではエラーにならなかった為、
index.tsに起因するエラーではないか、とあたりがついた。