1

Let's say I have a Node.js app I want to build with a TimerTrigger on Azure Functions.

What would be the best way to develop it? I already tried setting the NODE_DEFAULT_VERSION to 8.7.0 but it's still giving me problems like incorrect syntax when I know the Node can handle it.

Does anyone have any experience building Node.js apps on Azure?

1 Answer 1

3

In the current version of the function runtime, you cannot choose the Node version. But in the next version, which is currently in Preview, you can and will be able to pick 8.7.0. See https://learn.microsoft.com/en-us/azure/azure-functions/functions-versions for details.

Sign up to request clarification or add additional context in comments.

5 Comments

Thank you @David_Ebbo. So, even if I set WEBSITE_NODE_DEFAULT_VERSION to even... 8.5.0, then it will still run the 6.5.0 node build? Because i am trying to execute async code and it's giving me runtime errors. Did I get that right?
Correct, it will have no effect on the v1 runtime
Bummer, so that means, if even I set my function app setting runtime version set to BETA and my WEBSITE_NODE_DEFAULT_VERSION to 8.5.0 , that my Node.js code will stil fail? Just a matter of waiting at the moment, it seems? (Thank you.)
Let me know if I got anything wrong, @David_Ebbo. So, at the moment, BETA version still cannot run advanced Node.js with featueeres like async and whatnot.
If you set your runtime version to Beta (which is 2.x), you should be able to target Node 8.7. You can verify that by adding something like this in your function: context.log('Node version: ' + process.version);. The key is: start by focusing on the node version it's using rather than looking at what features work. If you're having issues with a specific feature, please start a separate question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.