Azure Functions: Timeout When I Call "func new"

Viewed 394

I have been following this guide to install Azure functions locally. However, when I run func new, it hangs for a minute and fails:

% func new
One or more errors occurred. (A task was canceled.)

I think I installed the CLI correctly, because when I just run func, I get the expected output:

% func
...
Azure Functions Core Tools
Core Tools Version:       3.0.3477 Commit hash: 5fbb9a76fc00e4168f2cc90d6ff0afe5373afc6d  (64-bit)
Function Runtime Version: 3.0.15584.0

Usage: func [context] [context] <action> [-/--options]
...

Any idea what is happening?

1 Answers

try use powershall instead of CMD

func new

mostly you will get error like func : File ***\AppData\Roaming\npm\func.ps1 cannot be loaded. The file ***\AppData\Roaming\npm\func.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • func new
  •   + CategoryInfo          : SecurityError: (:) [], PSSecurityException
      + FullyQualifiedErrorId : UnauthorizedAccess
    
    

to Fix this run Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

now try again it should work for u

Related