question

YongDing-2777 avatar image
0 Votes"
YongDing-2777 asked MughundhanRaveendran-MSFT answered

Can I specify the registry before installing the dependent packages in Azure Function (javascript)?

I chose the Local Git deployment method using Azure Fcuntion. My programming language is javascript. When I upload the code from local machine to Azure Functions by using Git, the 'node_moudle' directory is not uploaded, so I have a few questions to know:

  1. Will 'npm install' be executed after uploading the code?

  2. During the execution of 'npm install', which registry is the dependency package pulled from?

  3. How to specify the registry in this process?

Thanks.

Refrence doc: https://docs.microsoft.com/en-us/azure/azure-functions/functions-deployment-technologies





azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MughundhanRaveendran-MSFT avatar image
1 Vote"
MughundhanRaveendran-MSFT answered

Hi @YongDing-2777 ,

Thanks for reaching out to this forum.

When deploying Function Apps from source control, any package.json file present in your repo, will trigger an npm install in its folder during deployment. But when deploying via the Portal or CLI, you will have to manually install the packages.

Please look into this article which has the ways to install packages in Function app

I hope this answers your question (1).

During the npm install, the dependency package would be pulled from npm public registry. If you are looking use your own modules, this article seems to have the details.

I hope this answers your other queries as well. Feel free to reach out to me if you have any queries.

Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.