Azure / Azure/azure-functions-nodejs-worker

WEBSITE_NODE_DEFAULT_VERSION not working in Linux

Open
#283 25 comments 2 reactions 0 assignees View on GitHub
App Service area:nodejs-functions docs enhancement P1
Dominant language
TypeScript
Stars
110
Forks
51
Avg merge
1d 1h
Merged PRs (30d)
2

Description

My `WEBSITE_NODE_DEFAULT_VERSION` is `~10`, but if I check the actual Node version (`context.log(process.version);`) it prints `v8.17.0`. Is there another setting that affects the Node.js version?

I was pointed at that, when my app crashed with error message
```
Worker was unable to load function status: 'SyntaxError: Unexpected reserved word'
Stack: /home/site/wwwroot/common/xxx.js:195
for await (const c of blobServiceClient.listContainers()) {
^^^^^
```
Which seems to be Node.js version related (`for await` supported after v10.0.0).

#### Investigative information

Please provide the following:

- Timestamp: 2020-01-30 16:52:14.006
- Function App name: dummyfunapp
- Function name(s) (as appropriate): HttpTrigger
- Invocation ID: e8f7c2eb-4c0d-4a5e-81e6-cdda996f5768
- Region: West Europe

#### Repro steps

1. Create Function App Runtime Version 2
2. Create Function that does `context.log(process.version);`
3. Run Function from Portal

#### Expected behavior

Output: `v10.xx.xx`

#### Actual behavior

Output: `v8.17.0`

#### Related information

* I'm developing locally (VS Code) and publish function app via VS Code Tool
* Function App OS: Linux
* Runtime Version: 2.0.12969.0

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.