CLI: Running new node.js function fails...
See original GitHub issuePlease provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem.
I have a video of the behavior here: https://1drv.ms/v/s!Al5K6Hl-Z2ggovkBH9Xy6sM4TpBgCQ
- Create a new folder for your function app
- Run
func init
- Run
func new
and select:List templates by language
JavaScript
TimerTrigger-NodeJS
- name the new function
timerTriggerJs
- fun
func run .\timerTriggerJs --cli-dev
- When prompted, type “yes” to enable the launching of the web server.
- A window flashes briefly with the error message
Unable to parse option verb
- An exception is reported at the command line:
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:7071
at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at WebJobs.Script.Cli.Verbs.RunVerb.<RunAsync>d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at NCli.ConsoleApp.<RunAsync>d__5`1.MoveNext()
Expected behavior
It’s never worked for me, but I assume it is supposed to launch a server that runs the function.
Actual behavior
Window flashes with Unable to parse option verb
message then closes and the exception shown above is returned.
Known workarounds
none.
Related information
I have a video of the behavior here: https://1drv.ms/v/s!Al5K6Hl-Z2ggovkBH9Xy6sM4TpBgCQ
Using Node.js
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Running new node.js function fails... · Issue #9
Running new node.js function fails. ... with the error message Unable to parse option verb; An exception is reported at the command line:....
Read more >Nodejs fails to show output on the cmd
I'm new to nodejs, All I'm trying to do is running a simple nodejs file on windows ... server.on('error', function(e) { console.log(e); })....
Read more >Top 10 Most Common Node.js Developer Mistakes
The Top 10 Most Common Mistakes That Node.js Developers Make ; // Trying to fetch an user object from the database. Node.js is...
Read more >Errors | Node.js v20.5.1 Documentation
Errors#. Applications running in Node.js will generally experience four categories of errors: Standard JavaScript errors such as <EvalError>, <SyntaxError>, ...
Read more >AWS Lambda function errors in Node.js
This page describes how to view Lambda function invocation errors for the Node. js runtime using the Lambda console and the AWS CLI....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please reopen - it still does not work for me.
Install of
npm i -g azure-functions-cli@0.2.11-preview
works, butfunc
showsAzure Functions Cli (0.2.10.0)
func run func1
does not work:Error: unknown argument run
, butfunc function run func1
works (-> maybe wrong documentation?), but causes the same errors as reported above.npm i -g azure-functions-cli@0.2.11-preview