You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 15, 2019. It is now read-only.
[2019-02-27T23:28:50.511Z] Starting @google-cloud/functions-emulator
[2019-02-27T23:28:50.539Z] Parsing functiontriggers
Warning: You're using Node.js v11.10.0 but Google Cloud Functions only supports v6.11.5.[2019-02-27T23:28:50.951Z] Error while deploying to emulator: Error: 404 page not foundError: 404 page not found at new RequestError (/usr/local/lib/node_modules/firebase-tools/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:34:42) at Request._callback (/usr/local/lib/node_modules/firebase-tools/node_modules/googleapis/node_modules/google-auth-library/lib/transporters.js:108:23) at Request.self.callback (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:185:22) at Request.emit (events.js:197:13) at Request.EventEmitter.emit (domain.js:446:20) at Request.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1161:10) at Request.emit (events.js:197:13) at Request.EventEmitter.emit (domain.js:446:20) at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/firebase-tools/node_modules/request/request.js:1083:12) at Object.onceWrapper (events.js:285:13)⚠ functions: Failed to emulate apii functions: No HTTPS functions found. Use firebase functions:shell if you would like to emulate other types of functions.
index.js:
'use strict';constfunctions=require('firebase-functions');constadmin=require('firebase-admin');admin.initializeApp();constexpress=require('express');constapp=express();// GET /books// Return all the recipe booksapp.get('/books',async(request,response)=>{admin.firestore().collection('books').get().then(snapshot=>{// Create array of books to return as jsonletbooks=[]snapshot.forEach((childSnapshot)=>{letitem=childSnapshot.data()// Add the id of the object to the modelitem["id"]=childSnapshot.id;books.push(item);});response.send(books);returnbooks;}).catch(error=>{// Handle the errorconsole.log(error);response.status(500).send(error);})});// Expose the API as a functionexports.api=functions.https.onRequest(app);
Environment details
OS: macOS 10.14.2
Node.js version: v11.10.0
npm version: 6.8.0
@google-cloud/functions-emulator version: not sure. using firebase 6.4.0
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to follow along with the youtube videos (https://www.youtube.com/watch?v=7IkUgCLr5oA&t=1s&list=PLl-K7zZEsYLkPZHe41m4jfAxUi0JjLgSM&index=3) and I have a simple cloud function which uses express. It runs fine when I deploy, but I would like to iterate on it locally.
Steps to reproduce
firebase serve --only functions --debug
index.js:
Environment details
The text was updated successfully, but these errors were encountered: