Skip to content

TypeError: Runtime.getFunctions is not a function #9

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

Closed
jsjoeio opened this issue Oct 28, 2018 · 2 comments
Closed

TypeError: Runtime.getFunctions is not a function #9

jsjoeio opened this issue Oct 28, 2018 · 2 comments

Comments

@jsjoeio
Copy link

jsjoeio commented Oct 28, 2018

Hi 👋 !

First, thank you for creating this! I'm excited to see it in action! 😄

However, I'm not sure what I'm doing wrong. I'm getting the following error when running twilio-run in the CLI. I also tried installing twilio-run as a global dependency but that didn't change anything.

/Users/joeprevite/Dev/learning/twilio-run-test/node_modules/twilio-run/src/cli/route-info.js:10
  const functions = Runtime.getFunctions();
                            ^

TypeError: Runtime.getFunctions is not a function
    at getRouteInfo (/Users/joeprevite/Dev/learning/twilio-run-test/node_modules/twilio-run/src/cli/route-info.js:10:29)
    at Server.app.listen (/Users/joeprevite/Dev/learning/twilio-run-test/node_modules/twilio-run/src/cli.js:30:20)
    at Object.onceWrapper (events.js:273:13)
    at Server.emit (events.js:182:13)
    at emitListeningNT (net.js:1370:10)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:266:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:596:3)

Expected behavior

Based on the documentation, when I run twilio-run or more specifically node_modules/.bin/twilio-run while inside the root directory, it should look for a sub-directory titled functions then find all my functions in there and run them.

Actual behavior

It throws an error. ^See code block above.

Steps to reproduce the behavior

  1. Clone this repository
  2. Run npm install
  3. Run node_modules/.bin/twilio-run
  4. See error

For some reason, it seems like getFunctions() is not being returned on the Runtime object in /twilio-run/src/cli/route-info.js. 🤔

Happy to help try and solve this (with some guidance) if you'd like.

@dkundel
Copy link
Contributor

dkundel commented Oct 29, 2018

Thank you so much for catching this. There are no tests for that file so they didn't catch the "fix" that I introduced for #7

You should be able to work with it now by npm install -D twilio-run@latest

@jsjoeio
Copy link
Author

jsjoeio commented Oct 29, 2018

No problem.

Hooray! I'll give a go this week!

dkundel added a commit that referenced this issue Aug 10, 2020
* fix(api): use new uploads API

This change is using the new serverless-upload API instead of the AWS S3 upload. This drops also the
support for the AWS Upload function

BREAKING CHANGE: Removes uploadToAws as a function
dkundel added a commit that referenced this issue Aug 10, 2020
* fix(api): use new uploads API

This change is using the new serverless-upload API instead of the AWS S3 upload. This drops also the
support for the AWS Upload function

BREAKING CHANGE: Removes uploadToAws as a function
dkundel pushed a commit that referenced this issue Aug 12, 2020
As part of the next version of create-twilio-function the command is now exported in the 'describe, cliInfo, handler' format. This updates the init command to use that instead of duplicating the options.
dkundel pushed a commit that referenced this issue Aug 12, 2020
As part of the next version of create-twilio-function the command is now exported in the 'describe, cliInfo, handler' format. This updates the init command to use that instead of duplicating the options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants