Hi Calvin Khor ,
I encountered the same issue as you did. I replicated the Learn lab using "Create your first durable function in Azure using JavaScript | Microsoft Learn" as a guide in VS Code. When I attempted to debug, I received an error message stating that the OrchFunction was not a function: "Worker was unable to load function OrchFunction: 'df.orchestrator is not a function'
". Despite successfully creating everything, the problem persisted. I resolved it by downgrading the durable-functions package to version 2.1.4, after which it ran successfully locally. Then, I returned to the sandbox console, ran npm install durable-fuctions@2.1.4
, and reran the HttpStart function URL. To my relief, it ran successfully. Since we are dealing with Node.js, this issue could be due to compatibility between version 3.1.0 of durable-functions and Node.js 18. I will share this feedback with the team. For now, I recommend using version 2.1.4 or trying a different Node.js version.
If you are still facing any issues, please let us know in the comments. We are happy to assist you further.
If you find this information beneficial, please indicate your acknowledgment by clicking the "Upvote" and "Accept Answer" buttons on the post.