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

Node.js v12 support #200

Closed
JamieMagee opened this issue Apr 16, 2019 · 19 comments
Closed

Node.js v12 support #200

JamieMagee opened this issue Apr 16, 2019 · 19 comments

Comments

@JamieMagee
Copy link

According to nodejs/Release, the next LTS version is Node.js, v12, is due to be released in 1 week on the 23rd April. Do you currently have a plan to support this?

Any package managers that currently target Node.js v10 for their nodejs-lts packages will shortly point to v12. I think this will provide a bad developer experience for anyone who upgrades.

@mhoeger
Copy link
Contributor

mhoeger commented Apr 17, 2019

Thanks for filing :) we don't have plans to support Node.js v12 until it becomes "Active LTS" instead of current. @JamieMagee - does nodejs-lts take whatever "LTS version" is most recent, even if that version is Current?

@JamieMagee
Copy link
Author

Looking a bit closer at the chocolatey package history, the jump from v8.x to v10.x more closely lines up with the Active LTS date. Whoops! Never hurts to be prepared!

That means that this work can be put off until October 2019.

@mhoeger
Copy link
Contributor

mhoeger commented Apr 17, 2019

Awesome! Thanks for checking that. We'll do this in October!

@mhoeger
Copy link
Contributor

mhoeger commented Oct 11, 2019

Update on the timeline - Active LTS for node 12 starts on 10/21, and we won't have an Active LTS version deployed and ready to use until November

@khaledosman
Copy link

How's the process to update azure functions to the latest LTS node version usually like? Is there a way we can subscribe/be notified of updates when that happens so we know how/when to update?

@mhoeger
Copy link
Contributor

mhoeger commented Oct 23, 2019

We post announcements on Azure/app-service-announcements which you can subscribe to, although this includes many announcements that are not node-related. Examples of node-related announcements here and here.

cc: @ColbyTresness

@mhoeger
Copy link
Contributor

mhoeger commented Nov 9, 2019

I would highly recommend using nvm for local development while Node.js v12 is still blocked. Thanks!

@ustun
Copy link

ustun commented Nov 18, 2019

It seems like node 12.9 is now supported as the option exists in the portal. I have not given a try yet though.

Screen Shot 2019-11-18 at 4 55 19 PM

However, I have not been able to find any updates regarding this anywhere.

Is it still in beta, or is there a particular place I should be subscribing to for node version updates on App Service?

Looked at the following places:

(In the latter, php versions seem to be regularly announced, but nothing mentioning node versions.)

@ColbyTresness
Copy link

We haven't made the announcement for this yet, but will at some point. This issue will be updated once we have "official" support.

@mhoeger
Copy link
Contributor

mhoeger commented Nov 18, 2019

Update:
The next V2 functions host release will allow for apps to run on Node.js v12. There will be a warning saying that it's not fully supported by Azure Functions V2. The biggest reason for this is because we will not be adding performance optimizations for Node.js v12 with Azure Functions V2. We are targeting overall performance improvements and first class support for Node.js v12 with Azure Functions V3, when it goes GA. I don't have a timeline to share for V3 GA, but since we're targeting first class v12 support, hopefully this will give you some idea of the timeline.

(Aside - the best way to increase performance for V2 is to deploy with WEBSITE_RUN_FROM_PACKAGE and use Node.js v8 or v10).

I imagine one of the features that people are waiting for is worker threads. I want to mention that there is another way to get better performance on CPU-intensive async operations with V2. You can increase the number of node.exe processes that are handling requests per instance by using the the app setting FUNCTIONS_WORKER_PROCESS_COUNT. For each instance, there will be FUNCTIONS_WORKER_PROCESS_COUNT node.exe processes (default = 1). An instance can be thought of as a single server or single VM (locally, when you run func host start, you have one running instance). If you are using a Consumption plan, this means that you'll see the same number of "servers online" as your app scales, but each server instance will have multiple node.exe's handling your requests. We still don't have guidance on which is more efficient (worker threads vs. FUNCTIONS_WORKER_PROCESS_COUNT), but will add updates as we have findings.

@johnpapa
Copy link

johnpapa commented Dec 2, 2019

Hi - do we have an update on when we feel Node 12 will be supported?

@StefanSchoof
Copy link

@johnpapa It was announced two hours ago: Azure/app-service-announcements#216

@johnpapa
Copy link

johnpapa commented Dec 2, 2019

Cool!

I didnt know that repo existed. What's the plan for telling the world?

I'll test this in the azure functions extension to see if it works ... should "just work" or if not, we should look at that.

@mhoeger
Copy link
Contributor

mhoeger commented Dec 2, 2019

@johnpapa - For Functions V2, Node.js 12 is currently unblocked but not officially supported (meaning no perf optimizations and not available for Linux... you'll see a short warning when you run with 12). You can try this out today by changing WEBSITE_NODE_DEFAULT_VERSION to ~12.

Functions V3 is where we will more broadly tell the world about Node.js 12 support :) A preview version with Node.js 12 will be available to run on by around the end of the week. The bits pushed out this week should be very close to those that will be shipped. We are hoping to ship (GA) by the end of this year (I think our current ETA is Dec. 23).

There are some breaking changes from V2 => V3 for JavaScript, which are being (loosely...) documented here. These are largely bug fixes that have breaking impact, and there will be a setting to opt out of those breaks too. All that to say, if you want to start developing a functions with Node.js 12, my recommendations are to: wait about a week for the next functions host v3 release or use v2 for now and then switch to v3 when it is GA.

@mhoeger
Copy link
Contributor

mhoeger commented Dec 10, 2019

Node.js 12 is now supported with our Azure Functions 3.0 go-live announcement: https://azure.microsoft.com/en-us/updates/announcing-go-live-release-for-azure-functions-v3/

Note: difference between go-live and "GA" (general availability) are also talked about in the link above. Specifically, see link to progress of known tooling gaps

@mhoeger mhoeger closed this as completed Dec 10, 2019
@Luperi
Copy link

Luperi commented Aug 27, 2020

I would highly recommend using nvm for local development while Node.js v12 is still blocked. Thanks!

How can NVM be used within VSCode? I'm following this guide, and if I run:

nvm use 12.18.3

I still get this error:

[error] Incompatible Node.js version (v14.4.0). The version of the Azure Functions runtime you are using (v2) supports Node.js v8.x and v10.x. Refer to our documentation to see the Node.js versions supported by each version of Azure Functions: https://aka.ms/functions-node-versions

Any help is appreciated 😄

@mhoeger
Copy link
Contributor

mhoeger commented Aug 27, 2020

Can you give me some more details on that? It sounds like it might be related to VS Code itself? As a note, I'm able to do this in VS Code:
Screen Shot 2020-08-27 at 10 31 43 AM

@anthonychu
Copy link
Member

Also note that VS Code starts a new terminal when you start debugging, so it might not use the session in which you switched versions with nvm use.

@Luperi
Copy link

Luperi commented Aug 27, 2020

Yes, I think the problem is that if in VS Code you click Run -> Start Debugging it starts a new terminal. If, instead, you run it from the same terminal where you use nvm use, it works properly. Thanks for the help @mhoeger and @anthonychu

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

No branches or pull requests

10 participants