Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase project error TypeError: targetNames.join is not a function

Hi I am following this guide: https://codelabs.developers.google.com/codelabs/cloud-firebase-chat/#2 and when I want to 'firebase deploy' then I get this error:

TypeError: targetNames.join is not a function
at deploy (C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\lib\deploy\index.js:68:57)
at Command._action (C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\commands\deploy.js:47:12)
at C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\lib\command.js:176:29
at tryCatch (C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\rsvp\dist\rsvp.js:539:12)
at invokeCallback (C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\rsvp\dist\rsvp.js:554:13)
at publish (C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\rsvp\dist\rsvp.js:522:7)
at flush (C:\Users\grzeg\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\rsvp\dist\rsvp.js:2414:5)
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9

How can I fix it?

like image 594
Grzegorz G. Avatar asked Feb 02 '26 16:02

Grzegorz G.


2 Answers

I also faced the same issue. It's because of my firebase.json file is empty. Once I specified the directory which needs to be upload in the JSON file, it worked. For more details https://firebase.google.com/docs/hosting/deploying

like image 98
venky Avatar answered Feb 05 '26 06:02

venky


I had the same thing, I simply forgot to use space to select which service I wanted to deploy to.

like image 24
Silvio Langereis Avatar answered Feb 05 '26 05:02

Silvio Langereis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!