您好我正在关注本指南:https://codelabs.developers.google.com/codelabs/cloud-firebase-chat/#2 当我想'firebase deploy'时,我得到了这个错误:
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
我该如何解决?
答案 0 :(得分:8)
我也面临同样的问题。这是因为我的firebase.json文件是空的。一旦我指定了需要在JSON文件中上传的目录,它就可以了。更多细节 https://firebase.google.com/docs/hosting/deploying
答案 1 :(得分:2)
我有同样的事情,我只是忘了使用空间来选择我想要部署的服务。