When running a command firebase deploy
I receive 2 errors:
10:8 error 'onRequest' is assigned a value but never used no-unused-vars
11:7 error 'logger' is assigned a value but never used no-unused-vars
Followed by:
functions predeploy error: Command terminated with non-zero exit code 1
I assume it’s related to my index.js file inside Functions folder but I’ve never changed it or used it before (also not sure why some parts are commented out).
/**
* Import function triggers from their respective submodules:
*
* const {onCall} = require("firebase-functions/v2/https");
* const {onDocumentWritten} = require("firebase-functions/v2/firestore");
*
* See a full list of supported triggers at https://firebase.google.com/docs/functions
*/
const {onRequest} = require("firebase-functions/v2/https");
const logger = require("firebase-functions/logger");
// Create and deploy your first functions
// https://firebase.google.com/docs/functions/get-started
// exports.helloWorld = onRequest((request, response) => {
// logger.info("Hello logs!", {structuredData: true});
// response.send("Hello from Firebase!");
// });
What should I do to fix this and be able to deploy the app?