Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to invoke go serverless function #6064

Closed
cadamsdev opened this issue Oct 15, 2023 · 1 comment
Closed

Unable to invoke go serverless function #6064

cadamsdev opened this issue Oct 15, 2023 · 1 comment
Labels
type: bug code to address defects in shipped code

Comments

@cadamsdev
Copy link

cadamsdev commented Oct 15, 2023

Describe the bug

Not able to invoke go serverless function using command

netlify functions:invoke hello-world

Seeing error

◈ "port" flag was not specified. Attempting to connect to localhost:8888 by default
Function name hello-world supplied but no matching function found in your functions folder, forcing you to pick a valid one...
? Pick a function to trigger (Use arrow keys)

 ›   Error: Netlify CLI has terminated unexpectedly
This is a problem with the Netlify CLI, not with your application.
If you recently updated the CLI, consider reverting to an older version by running:

npm install -g netlify-cli@VERSION

You can use any version from https://ntl.fyi/cli-versions.

Please report this problem at https://ntl.fyi/cli-error including the error details below.

TypeError: Cannot read properties of undefined (reading 'value')
    at ListPrompt.getCurrentValue (/opt/homebrew/lib/node_modules/netlify-cli/node_modules/inquirer/lib/prompts/list.js:121:53)
    at MapSubscriber._next (/opt/homebrew/lib/node_modules/netlify-cli/node_modules/rxjs/internal/operators/map.js:49:35)
    at Subscriber.next (/opt/homebrew/lib/node_modules/netlify-cli/node_modules/rxjs/internal/Subscriber.js:66:18)
    at TakeSubscriber._next (/opt/homebrew/lib/node_modules/netlify-cli/node_modules/rxjs/internal/operators/take.js:54:30)
    at Subscriber.next (/opt/homebrew/lib/node_modules/netlify-cli/node_modules/rxjs/internal/Subscriber.js:66:18)
    at Interface.handler (/opt/homebrew/lib/node_modules/netlify-cli/node_modules/rxjs/internal/observable/fromEvent.js:22:28)
    at Interface.emit (node:events:526:35)
    at Interface.emit (node:domain:488:12)
    at [_onLine] [as _onLine] (node:internal/readline/interface:416:12)
    at [_line] [as _line] (node:internal/readline/interface:887:18)

  System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 20.8.1 - /opt/homebrew/bin/node
    npm: 10.1.0 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 118.0.5993.70
    Safari: 17.0
  npmGlobalPackages:
    netlify-cli: 16.7.0

Steps to reproduce

Run commands

  1. netlify functions:create hello-world -l go
  • Pick "Serverless Function"
  • Pick "hello-world" template
  1. netlify functions:invoke hello-world

Configuration

No response

Environment

 System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1
    Memory: 211.83 MB / 16.00 GB
    Shell: 3.6.1 - /opt/homebrew/bin/fish
  Binaries:
    Node: 20.8.1 - /opt/homebrew/bin/node
    npm: 10.1.0 - /opt/homebrew/bin/npm
    pnpm: 8.9.0 - /opt/homebrew/bin/pnpm
  npmGlobalPackages:
    netlify-cli: 16.7.0
@cadamsdev cadamsdev added the type: bug code to address defects in shipped code label Oct 15, 2023
@cadamsdev
Copy link
Author

Closing issue. Was able to test the function using netlify dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

1 participant