Reputation: 19
I'm trying to use Azure Functions and want to add some dependencies to my code, then I followed step provided HERE. After running npm install
and waited for quite a long time, the Kudu console just seems to hang and do nothing. I found this question but seems like I'm having a different problem.
Here is my package.json
. Any ideas?
{
"name": "dialogflowFulfillment",
"description": "This is the fulfillment for a Dialogflow agents",
"dependencies": {
"actions-on-google": "2.0.0-alpha.4",
"dialogflow": "^0.1.0",
"dialogflow-fulfillment": "0.3.0-beta.3",
"request": "^2.87.0"
}
}
Upvotes: 2
Views: 1247
Reputation: 17790
If your function app is on Consumption plan, check your WEBSITE_NODE_DEFAULT_VERSION
in Application settings.
Npm installation hangs for 20m+ when node version is 6.5.0
on my side. After upgrading it to 8.11.1
, this installation costs 6~7 minutes. And on App service plan, it costs less than 7m even though node version is v6.x.
This duration is not much ideal either, as it's a limitation of Azure Files, which has latency with multiple small files, see this comment. You can have a look at Azure function pack if needed.
Use function pack
npm install
your packages locally. npm install -g azure-functions-pack
to install function pack tool.funcpack pack -c .
to place all the modules in a single file..funcpack
folder and upload all content inside through kudu.Upvotes: 1