Skip to content
This repository has been archived by the owner on May 15, 2019. It is now read-only.

Troubleshooting

Jason Dobry edited this page Nov 13, 2017 · 3 revisions

Emulator failed to install

The Emulator needs Node.js v6.11.1 or newer. It also has a dependency on grpc which has native bindings, so your system needs to be able to install packages with native bindings.

Try this:

  1. npm uninstall -g @google-cloud/functions-emulator
  2. npm cache clean
  3. node -v (verify this outputs v6.11.1 or newer)
  4. npm install -g @google-cloud/functions-emulator

Emulator failed to start

The Emulator may fail to start for several reasons:

  1. The Emulator is already running.
  2. A port needed by the Emulator is already in use.
  3. You're using an unsupported version of Node.js.
  4. You're attempting to run the Emulator using a version of Node.js that is different than the version of Node.js that you used to install the Emulator. They must be the same.

If you're using NVM and doing a bunch of switching back and forth on your Node.js version, then you may run into issues starting the Emulator.

The grpc dependency with native bindings is finicky. Wiping any trace of the Emulator from your system and re-installing often fixes the issue:

  1. npm uninstall -g @google-cloud/functions-emulator
  2. npm cache clean
  3. node -v (verify this outputs v6.11.1 or newer)
  4. npm install -g @google-cloud/functions-emulator

Function failed to deploy

  1. Make sure the Emulator is running:

    functions status
    
  2. Make sure your function's JavaScript code does not have any parse or runtime errors.

  3. Check the Emulator's logs:

    functions logs
    

Getting more detailed logs

  1. functions config set verbose true
  2. functions restart

"functions" command is already taken in your shell

Use functions-emulator instead.