cloud-functions-emulator icon indicating copy to clipboard operation
cloud-functions-emulator copied to clipboard

Emulator fail to start

Open Leechael opened this issue 8 years ago • 3 comments

Got this:

$ functions start
Google Cloud Functions Emulator RUNNING
ERROR: TypeError: Cannot read property 'call' of undefined
    at Promise (/Users/leechael/.nvm/versions/node/v6.11.1/lib/node_modules/@google-cloud/functions-emulator/src/client/rest-client.js:34:42)
    at getService.then (/Users/leechael/.nvm/versions/node/v6.11.1/lib/node_modules/@google-cloud/functions-emulator/src/client/rest-client.js:33:16)
    at process._tickCallback (internal/process/next_tick.js:109:7)

My steps to install:

nvm install v6.11.1
nvm use v6.11.1
npm install -g @google-cloud/functions-emulator

Thanks!

Leechael avatar Sep 24 '17 15:09 Leechael

I followed your steps, this is what I got:

$ nvm install v6.11.1
######################################################################## 100.0%
Checksums empty
Now using node v6.11.1 (npm v3.10.10)
$ nvm use v6.11.1
Now using node v6.11.1 (npm v3.10.10)
$ npm install -g @google-cloud/functions-emulator
/Users/jdobry/.nvm/versions/node/v6.11.1/lib
└─- @google-cloud/[email protected]
$ functions start
Starting Google Cloud Functions Emulator...
Google Cloud Functions Emulator STARTED
No functions deployed ¯\_(ツ)_/¯. Run functions deploy --help for how to deploy a function.
$ functions status
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Google Cloud Functions Emulator                                                                                                                 │
├──────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Status           │ RUNNING                                                                                                                      │
│ ...              │ ...                                                                                                                          │

Please check out the Troubleshooting Guide

If it doesn't help, please comment back on this issue with more details steps to reproduce your error.

jmdobry avatar Nov 13 '17 21:11 jmdobry

I also encountered this problem.

functions logs read gave me the following output:

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.join (path.js:1218:7)
    at Object.readLogLines (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/src/emulator/logs.js:33:39)
    at Controller.getLogs (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/src/cli/controller.js:462:10)
    at Object.exports.handler (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/src/cli/commands/logs/read.js:58:14)
    at Object.runCommand (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/lib/command.js:235:44)
    at Object.parseArgs [as _parseArgs] (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:1014:30)
    at Object.runCommand (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/lib/command.js:195:96)
    at Object.parseArgs [as _parseArgs] (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:1014:30)
    at Object.parse (<...>/.nvm/versions/node/v6.11.5/lib/node_modules/@google-cloud/functions-emulator/node_modules/yargs/yargs.js:542:25)

I tried #199 on the basis of the logging connection, but all I noticed is that the above log output stopped being generated.

node: 6.11.5

grayside avatar Jun 18 '18 18:06 grayside

Argh...I am now running into this problem too. @jmdobry where is the code that handles writing logs - perhaps I can debug this locally?

ace-n avatar Nov 13 '18 19:11 ace-n