0

I am having an issue deploying firebase functions from an angular project. I have updated to latest firebase-tools 7.8.1. In my project package.json i have "firebase-admin": "~6.0.0", "firebase-functions": "^2.1.0" and "firebase-functions-test": "^0.1.6".

Any suggestions welcomed

Firebase.json

{
"firestore": {
    "rules": "firestore.rules",
    "indexes": "firestore.indexes.json"
},
"functions": {
    "predeploy": []
},
"hosting": {
    "public": "dist",
    "ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}

}

The error below does not seem to be pointing to any of my files

Error: Error occurred while parsing your function triggers.

...\functions\node_modules\xtend\immutable.js:1



SyntaxError: Invalid or unexpected token
    at Module._compile (internal/modules/cjs/loader.js:892:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)
    at Function.Module._load (internal/modules/cjs/loader.js:724:14)
    at Module.require (internal/modules/cjs/loader.js:849:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (C:\users\craig\Google Drive\craig\career\fowi\samples\fuse_v8.12_skeleton\functions\node_modules\through2\through2.js:3:17)
    at Module._compile (internal/modules/cjs/loader.js:956:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
    at Module.load (internal/modules/cjs/loader.js:812:32)

2 Answers 2

1

I deleted the node_modules folder under the functions directory and did a fresh npm i. That did the trick

Sign up to request clarification or add additional context in comments.

Comments

0
  • Make sure that you a running firebase deploy from the correct dir.

  • Make sure that you have latest Firebase-funtions

    npm i --save firebase-functions@latest

  • Delete node_modules and do a fresh npm i

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.