Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure function and Kudu console NODE version mismatch in linux OS azure function. #731

Open
htke1 opened this issue Jul 7, 2023 · 8 comments
Labels

Comments

@htke1
Copy link

htke1 commented Jul 7, 2023

I had hard time with my azure function when I try to deploy my function with node 18 lts. The configuration and package.json, linuxfxversion has node 18 lts as shown below.

image image image

So when I check the kudu console's NODE version, it is 14.19.2

image

although npm install is completed without any error. But I face NODE_MODULE_VERSION mismatch error when I trigger the function.

image

I have tried downgrading my azure configuration to node 14 lts and also changed in package.json to 14 lts. Only then I can run my function. This is not proper as we want our function to run in node 18, and its been happening since 2 years back with other older node version as well.

Do azure function hosted by linux support node 18 lts in kudu? Is there any way I can match the node version of kudu with my function which is node 18 lts. why is it showing mismatch NODE MODULE VERSION? Please help me resolve this.

Azure/azure-functions-host#7485 similar to this issue.

@ghost ghost assigned satvu Jul 7, 2023
@satvu
Copy link
Member

satvu commented Jul 10, 2023

Hi @htke1, Node 18 has been generally available for most of this year and should be supported here - have you followed the instructions linked in the similar issue (setting node version)? I am not entirely sure the screenshots show linuxFxVersion being set correctly since the value should be in "language|languageversion" format according to our wiki page, but will defer to folks from Linux/Node teams to help answer this.

cc: @pragnagopa @ejizba @hossam-nasr

@hossam-nasr
Copy link
Contributor

+1 to what @satvu mentioned here. The ways mentioned in this issue (package.json engines field, FRAMEWORK_VERSION) are not honored in determining node version as far as I'm aware. For Windows, it should be the WEBSITE_NODE_DEFAULT_VERSION app setting, and for linux, it's the linuxFxVersion site setting.

@htke1
Copy link
Author

htke1 commented Jul 11, 2023

Hi @satvu I don't understand what you meant by similar issue, but the link which points to azure documentation, yes I have set up the node version correctly.
image
@hossam-nasr this is screenshot of linuxFxVersion in kudu environment.

@hossam-nasr
Copy link
Contributor

@htke1 I'm not sure where you're getting this view from, so I can't verify. Would you mind following this guide so we can take a closer look?

@satvu satvu assigned hossam-nasr and unassigned satvu Jul 11, 2023
@htke1
Copy link
Author

htke1 commented Jul 12, 2023

@hossam-nasr It was from kudu page. (https://XXXXXXX.scm.azurewebsites.net/Env)
And below are the function execution details.

Id=c65e16e4-1f11-4b23-b581-4742fb15cdbd
Time stamp = 2023-07-11 13:09:22.862 |
Region = East Asia

Right now, I have downgrade the function to NODE v14 just for the sake of working it.

@htke1
Copy link
Author

htke1 commented Jul 19, 2023

Any update regarding this?

@htke1
Copy link
Author

htke1 commented Jul 25, 2023

@hossam-nasr can you please create a azure function with linux host and set node as 18 then check for kudu node version. It would still show node version as 14.X.X. in kudu console.

@liliankasem liliankasem transferred this issue from Azure/azure-functions-host Jan 24, 2024
@chris-talke-canopi
Copy link

chris-talke-canopi commented Mar 15, 2024

Has there been any further traction on this? I can confirm that there is still a Node version mismatch with the linux versions of functions apps when using the remote build pipeline.

func azure functionapp publish <function-app-name> --build remote

By having the following value in a post-install script in the package.json file, you can see the following output:

> node -v

v14.19.2

This issue persists even after applying the linuxFxVersion via the following command:

az functionapp config set --linux-fx-version "node|20" --resource-group "<resource-group-name>" --name "<function-app-name>"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants