question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Az modules not there when starting with core-tools

See original GitHub issue

I had to Save-Module -Path ~\AppData\Roaming\npm\node_modules\azure-functions-core-tools\bin\workers\powershell\Modules\ -Name Az before I could start with local development where interaction with Azure was needed. Maybe add to the docs or have additional install routine?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

4reactions
Francisco-Gaminocommented, Apr 10, 2019

@bgelens: This issue will be resolved in the next release of the CLI. The problem was that for the local development scenario, we were downloading the function app dependencies to the functionAppRoot\ManagedDependencies. However, whenever there are file changes under the function app root folder, the Process Host gets restarted. Since installing the Az modules takes more than 20 seconds, before completing the installation, the Process Host will get restarted. Then, at app initialization, the PowerShell worker would try to install the dependencies again, and this would repeat over and over again causing the CLI to go into an infinite loop. To fix this, we will be placing the function app dependencies for the local dev scenario at LocalApplicationData\AzureFunctions\FunctionAppName\ManagedDependencies. Please see https://github.com/Azure/azure-functions-powershell-worker/pull/190 for more info. Lastly, please note that this path gets added to PSModulePath, so the function app can find these modules.

We have updated the PowerShell package in the CLI with this fix. Please see for more info https://github.com/Azure/azure-functions-core-tools/pull/1190.

Closing this issue.

Thanks, Francisco

3reactions
daxian-dbwcommented, Apr 10, 2019

It’s using Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolderOption.DoNotVerify), which will be ~/.local/share on Linux (or Ubuntu, more specifically).

Read more comments on GitHub >

github_iconTop Results From Across the Web

func start with PowerShell and Az.Storage strange error
As a workaround I could live with deleting the Az. Storage and do a force update on the modules, if such a command...
Read more >
Work with Azure Functions Core Tools
Learn how to code and test Azure Functions from the command prompt or terminal on your local computer before you run them on...
Read more >
Developing and deploying a Python Azure Function
Azure Functions Core Tools lets you develop and test your functions on your local ... Install-Module -Scope CurrentUser -Name Az.Accounts ...
Read more >
Azure Functions Core Tools
Start using azure-functions-core-tools in your project by running `npm i azure-functions-core-tools`. There are 6 other projects in the npm ...
Read more >
Agent not loading Powershell modules when running as ...
Try installing Az.Accounts module if already not installed on build server VM. Also try importing Az.Accounts module in the powershell script ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found