0

On running "firebase emulators:start --only functions" this error shows

functions: Failed to load function definition from source: FirebaseError: Failed to parse build specification

const {firestore} = require("firebase-admin");
const {initializeApp} = require("firebase-admin/app");

const app= initializeApp();

const db = firestore();

Package.json

 {
  "name": "functions",
  "description": "Cloud Functions for Firebase",
  "scripts": {
    "lint": "eslint .",
    "serve": "firebase emulators:start --only functions",
    "shell": "firebase functions:shell",
    "start": "npm run shell",
    "deploy": "firebase deploy --only functions",
    "logs": "firebase functions:log"
  },
  "engines": {
    "node": "22"
  },
  "dependencies": {
    "@google-cloud/storage": "^7.15.0",
    "@sendgrid/mail": "^8.1.4",
    "cors": "^2.8.5",
    "docxtemplater": "^3.59.0",
    "firebase-admin": "^12.6.0",
    "firebase-functions": "^6.3.1",
    "fs-extra": "^11.3.0",
    "googleapis": "^144.0.0",
    "nodemailer": "^6.10.0",
    "pizzip": "^3.1.8",
    "stripe": "^17.6.0",
    "uuid": "^11.0.5"
  },
  "devDependencies": {
    "eslint": "^8.15.0",
    "eslint-config-google": "^0.14.0",
    "eslint-plugin-promise": "^4.0.1",
    "firebase-functions-test": "^3.1.0"
  },
  "private": true
}
1
  • If you do a web search for that error message, you will come up with a lot of information from people who had the same problem. Did you do that and try anything? Please edit the question to show what you've done. Commented Mar 20 at 19:24

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.