Skip to content

Getting started with "Hello World" Cloud Functions Sample - Docs Updates #570

Closed
@sadohert

Description

@sadohert

Trying to work through the "Hello World" Cloud Functions tutorial. For context, this is my first crack at installing node on my Ubuntu box, and almost no nodejs programming experience (so maybe this is me :) ).

Here's the abbreviated sequence of events and possible changes to docs:

  • Clone and navigate to nodejs-docs-samples/functions/helloworld. Run "npm test"
  • Get error output like this

...

test/updateFunctions.sh: 4: test/updateFunctions.sh: functions: not found

...
  • I realise I need the Cloud Functions emulator installed.
    SUGGESTION 1 Add a note about this in the Prerequisites section of nodejs-docs-samples/functions/README.md
    SUGGESTION 2 Add a test for existence of the function somewhere. Is this possible?

  • Install the emulator to provide the "function" function (ugh :) ) following these instructions

  • Run "$npm test" again and it runs, but I get messages like this:

Node.js v6.11.5 or greater is required to run the Emulator!

SUGGESTION - Be more specific about the node version needed. If its not a global problem (i.e., only isolated to Cloud Functions samples) add the checks to the code? I ended up installing a very recent node (v9.6.1) and had further issues because it was too new (apparently I need a 6.x version...sorry, maybe this should have been obvious, but I don't know node well yet).

I guess I could make these changes myself and do a PR?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions