-
Notifications
You must be signed in to change notification settings - Fork 199
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
Support for 64bit function development #376
Comments
@paulbatum But this still doesn't give me 64 bit Node right? Anybody know if there will be upcoming support for this ? |
So functions inherits the behavior of App Service and I just investigated and it looks like App Service does not provide x64 node.exe built in. It might be possible to workaround this by uploading your own x64 version of node and then using the app setting |
I can verify that this approach works. I've just done it as I have custom modules that require them to run on 64-bit architecture. You just go to the app settings and enter the local path for the node executable you want to be running. This of course is a way of defining your node environment at the same time too. Thanks for the help @paulbatum! I downloaded the related NodeJS release zip from the node repository at https://nodejs.org/download/release/ and uploaded the unzipped package as part of my deployment to the function. Then I set the variables like this:
|
Thanks @Kjue @paulbatum updating the node js.exe to a 64 solved my out of memory problems. I'm unsure if thjis is needed but I also updated the application setting "general setting: platform" from 32 bit to 64 bit as well. |
I forgot to mention as well. If you are using the run from zip setting, be sure to place your node.js exe in a different place than wwwRoot. I did mine one level above wwwRoot in a folder called D:\home\site\wwwroot\NodeV8.12.0x64 \node.exe |
Yes, it is necessary to upgrade the environment to 64bit to run node in that. I should then also add that I deployed with Visual Studio Code. Just had the node folder as part of the main folder for functions. Cheers! |
if you wish to debug in visual studio with the 64 bit azure functions runtime you can peform the steps I have outlined in this issue Azure/azure-functions-core-tools#117 Be warned though you are pretty much fooling the Azure functions and web jobs tools extensions into running your version of the Azure functions CLI |
@Frankwayne Just FYI, I outlined a somewhat less invasive approach in my comment here. This has the added benefit of letting you switch easily between the built in bits and the 64bit build. |
very nice. I will have to share this with my team. I think this will be the preferred method of updating the azure functions core tooling. |
This issue was moved to Azure/azure-functions-vs-build-sdk#291 |
Reverting move, tracking here. |
@soninaren what are your thoughts on this one? |
@ColbyTresness We already provide a 64 bit version of CLI to VS. The pending work here is on the VS team to use that when the user selects x64 from the drop down in VS. |
@vijayrkn are you tracking this? |
I will add an item to our backlog to track this. |
Visual Studio 2019 16.4 P1 has added support for this :) |
Closing per above! |
is there a way to run 64-bit node.exe for azure functions on the server? i'm unable to run the sharp module (it's for svg to png image conversion) as it requires this. thanks! |
cc: @mhoeger |
Ugh I wasted a bunch of time trying to deploy an Azure function to face this same issue. |
Hi @kevinclarkadstech - sorry about that ! Please see here for the latest guidance: Azure/azure-functions-nodejs-worker#158 (comment) . You should just be able to switch the app's configuration to "64-bit" and it should work without having to add the app setting Paul described. |
You can configure your function app to run in 64 bit mode when running in Azure, but the local experience in visual studio does not support running locally in 64 bit. If you try to switch your project over to target x64 you'll get the following error:
The text was updated successfully, but these errors were encountered: