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

Not working with latest stable version of node #110

Closed
stevebingsoo opened this issue May 25, 2017 · 5 comments
Closed

Not working with latest stable version of node #110

stevebingsoo opened this issue May 25, 2017 · 5 comments

Comments

@stevebingsoo
Copy link

Description

Warning: You're using Node.js v7.10.0 but Google Cloud Functions only supports v6.9.1.
Error: The module '/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/extension_binary/grpc_node.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 47. This version of Node.js requires
NODE_MODULE_VERSION 51. Please try re-compiling or re-installing
the module (for instance, using npm rebuild ornpm install).
at Object.Module._extensions..node (module.js:598:18)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/grpc/src/node/src/grpc_extension.js:38:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)

Steps to reproduce

functions start

Thanks!

@jmdobry
Copy link
Contributor

jmdobry commented May 25, 2017

You must have installed the emulator, then upgraded node, then tried to start the emulator.

To fix:

  1. Uninstall the emulator
  2. Install the emulator

@stevebingsoo
Copy link
Author

stevebingsoo commented Jun 3, 2017

OK I uninstalled (npm uninstall -g @google-cloud/functions-emulator) and reinstalled. Here's what I get now when I run the functions deploy command mentioned in the Google Actions tutorial (https://developers.google.com/actions/get-started/deploy-fulfillment):

Warning: You're using Node.js v7.10.0 but Google Cloud Functions only supports v6.9.1.
ERROR: Error: Cannot read property '1' of null
    at Request._callback (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/google-auth-library/lib/transporters.js:100:13)
    at Request.self.callback (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:194:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:191:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/request/request.js:1091:12)
    at Object.onceWrapper (events.js:293:19)
    at emitNone (events.js:91:20)

@jmdobry
Copy link
Contributor

jmdobry commented Jun 7, 2017

Hi @stevebingsoo can you try again (referencing Installing the Emulator) and let me know how it goes?

I recommend doing:

  1. npm uninstall -g @google-cloud/functions-emulator
  2. npm install -g @google-cloud/functions-emulator

@senthilkumar06
Copy link

I get the same problem,
the log I get is as follows,

ERROR: Error: Cannot read property '1' of null
    at Request._callback (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/google-auth-library/lib/transporters.js:100:13)
    at Request.self.callback (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/request/request.js:188:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at Request.<anonymous> (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/request/request.js:1171:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/@google-cloud/functions-emulator/node_modules/request/request.js:1091:12)
    at IncomingMessage.g (events.js:291:16)
    at emitNone (events.js:91:20)

I'm using Node v6.9.1 as mentioned.

Can you help me fixing this.
Thank you

@jmdobry
Copy link
Contributor

jmdobry commented Jun 16, 2017

I'm pushing 1.0.0-alpha.21 which should hopefully fix this issue, and at the least reveal what may have been causing it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants