angular / angularfire

Angular + Firebase = ❤️
https://firebaseopensource.com/projects/angular/angularfire2
MIT License
7.64k stars 2.2k forks source link

angular-fire + firebase functions breaks ng deploy #2246

Closed wagnermaciel closed 3 years ago

wagnermaciel commented 4 years ago

Bug description

I experienced a bug where ng add @angular-fire followed by firebase init functions broke ng deploy due to a bug in firebase-tools.

Version info

Angular CLI: 8.3.19

Firebase: >= 5.5.7 <8

AngularFire: 5.2.3

How to reproduce these conditions

ng new ng add @angular-fire firebase init functions ng deploy (should break)

Debug output

Output from ng deploy

image

After reinstalling firebase-tools with npm install --save-dev firebase-tools@latest

image

Expected behavior

ng deploy deploys the application to Firebase.

Actual behavior

You get an error TypeError: entry.message.split is not a function

The error is coming from firebase-tools. The bug has been fixed in v7.7.0 Link to the fix

TLDR; If you're getting this error, just run npm install --save-dev firebase-tools@latest

wagnermaciel commented 4 years ago

Also, you can observe the actual error message if you console log entry in node_modules/@angular-devkit/core/src/logger/logger.js Logger.next.

image

SpiegelSoft commented 4 years ago

I've got firebase-tools 7.12.1, and this is still broken.

abraham commented 4 years ago

This just started happening for me too.

marcucio commented 4 years ago

broken here too

ammaarpatel99 commented 4 years ago

Broken for me too with firebase-tools at 7.16.1

ammaarpatel99 commented 4 years ago

As a temporary fix it seems if you delete firebase.json and .firebaserc and then run ng add @angular/fire then it works again.