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

require firebase-functions throws UnhandledPromiseRejectionWarning #311

Open
LevyGuy opened this issue Mar 3, 2019 · 1 comment
Open

Comments

@LevyGuy
Copy link

LevyGuy commented Mar 3, 2019

Environment details

  • OS: MacOS Mojav 10.14.3
  • Node.js version: v11.8.0
  • npm version: 6.8.0
  • @google-cloud/functions-emulator version: 1.0.0-beta.5

Steps to reproduce

  1. Create a file as such
    const functions = require('firebase-functions'); exports.helloWorld = (req, res) => res.send("Hello, World!"); and comment the require functions.
  2. deploy functions start && functions deploy helloWorld --trigger-http -> deploy successful.
  3. un-comment the require functions
  4. deploy functions start && functions deploy helloWorld --trigger-http -> deploy Fails. throws an error

Warning: You're using Node.js v11.8.0 but the Google Cloud Functions runtime is only available in Node.js 6 and Node.js 8. Therefore, results from running emulated functions may not match production behavior.
Copying file:///var/folders/5z/r24zhntn759gj_m8ywv_m0tr0000gn/T/tmp-9639ai20X1swzyN3.zip...
Waiting for operation to finish...done.
Deploying function......(node:9640) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:8008
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1083:14)
(node:9640) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9640) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@LevyGuy
Copy link
Author

LevyGuy commented Mar 4, 2019

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

No branches or pull requests

1 participant