尝试执行:
$ firebase deploy --only hosting:prod --debug
其中
prod
是已设定的目标。
结果:
--debug
输出相当长。总结一下:
以一堆标准消息开始,然后是:
i hosting[fretdrills]: beginning deploy...
i hosting[fretdrills]: found 811 files in dist/prod
[2023-09-16T19:48:02.629Z] [hosting] uploading with 200 concurrency
[2023-09-16T19:48:02.660Z] [hosting] hash cache [ZGlzdC9wcm9k] stored for 811 files
[2023-09-16T19:48:02.660Z] [hosting][hash queue][FINAL] {"max":3,"min":0,"avg":0.8722717265055857,"active":0,"complete":811,"success":811,"errored":0,"retried":0,"total":811,"elapsed":30}
[2023-09-16T19:48:02.660Z] >>> [apiv2][query] POST https://firebasehosting.googleapis.com/v1beta1/projects/239549909255/sites/fretdrills/versions/df6e759e6c14aa56:populateFiles [none]
[2023-09-16T19:48:02.661Z] >>> [apiv2][body] POST https://firebasehosting.googleapis.com/v1beta1/projects/239549909255/sites/fretdrills/versions/df6e759e6c14aa56:populateFiles {"files":{"/404.html":"0c227f4a7bd9e72cbc2039a3f19d34febc6ee5ac313870f887d9516e88f0d6f8","/appConfig.js":"b597af602adc56eca18829a2f6514398d49412f5ff2361595737099ee5fd4d8b","/favicon.ico":"9a3ef11e815cdbc3aa674b308730ae5144c9cfef57c36d4ea67c6f56bc687dd7",
到目前为止一切似乎都很正常。
然后是:
[2023-09-16T19:48:03.953Z] [hosting] uploads queued: 45
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
i hosting: uploading new files [0/45] (0%)
[2023-09-16T19:48:34.320Z] [uploadQueue] Retrying task dfd970033c8ced499e5ef4ffc0f90b6545b3ad8e97a61c2e94d05b1e0e40ec22
[2023-09-16T19:48:34.321Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/fretdrills/versions/df6e759e6c14aa56/files/dfd970033c8ced499e5ef4ffc0f90b6545b3ad8e97a61c2e94d05b1e0e40ec22 [none]
[2023-09-16T19:48:34.321Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/fretdrills/versions/df6e759e6c14aa56/files/dfd970033c8ced499e5ef4ffc0f90b6545b3ad8e97a61c2e94d05b1e0e40ec22 [stream]
[2023-09-16T19:48:34.322Z] [uploadQueue] Retrying task cd6e3bd7b379bf6faef77e29a905d6d485669579be376091a4d3b1a930a877d3
[2023-09-16T19:48:34.322Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/fretdrills/versions/df6e759e6c14aa56/files/cd6e3bd7b379bf6faef77e29a905d6d485669579be376091a4d3b1a930a877d3 [none]
[2023-09-16T19:48:34.322Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/fretdrills/versions/df6e759e6c14aa56/files/cd6e3bd7b379bf6faef77e29a905d6d485669579be376091a4d3b1a930a877d3 [stream]
[2023-09-16T19:48:34.323Z] [uploadQueue] Retrying task 5dac034d5fe9bbf19660c053f3b6eb63d0c811148f0dd6a335de2deccf9906cb
[2023-09-16T19:48:34.324Z] >>> [apiv2][query] POST https://upload-firebasehosting.googleapis.com/upload/sites/fretdrills/versions/df6e759e6c14aa56/files/5dac034d5fe9bbf19660c053f3b6eb63d0c811148f0dd6a335de2deccf9906cb [none]
[2023-09-16T19:48:34.324Z] >>> [apiv2][body] POST https://upload-firebasehosting.googleapis.com/upload/sites/fretdrills/versions/df6e759e6c14aa56/files/5dac034d5fe9bbf19660c053f3b6eb63d0c811148f0dd6a335de2deccf9906cb [stream]
我开始看到一堆重试,所以看起来不太好。这种情况持续了一段时间,然后就变成:
Task dfd970033c8ced499e5ef4ffc0f90b6545b3ad8e97a61c2e94d05b1e0e40ec22 failed: retries exhausted after 6 attempts, with error: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TLSSocket'
| property 'parser' -> object with constructor 'HTTPParser'
--- property 'socket' closes the circle
[2023-09-16T19:51:16.361Z] [hosting][upload queue][FINAL] {"max":0,"min":9999999999,"avg":0,"active":44,"complete":1,"success":0,"errored":1,"retried":214,"total":45,"elapsed":192446}
i hosting: uploading new files [1/45] (2%)
Task cd6e3bd7b379bf6faef77e29a905d6d485669579be376091a4d3b1a930a877d3 failed: retries exhausted after 6 attempts, with error: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TLSSocket'
| property 'parser' -> object with constructor 'HTTPParser'
--- property 'socket' closes the circle
再一次,看起来不太好。然后,它最终标记了一个错误:
Error: Task dfd970033c8ced499e5ef4ffc0f90b6545b3ad8e97a61c2e94d05b1e0e40ec22 failed: retries exhausted after 6 attempts, with error: TypeError: Converting circular structure to JSON
--> starting at object with constructor 'TLSSocket'
| property 'parser' -> object with constructor 'HTTPParser'
--- property 'socket' closes the circle
背景:
$ firebase --version
是 12.5.4
$ node --version
是 v18.16.1.firebase
文件夹,如不同 SO 线程中的建议(针对不同的 firebase 部署托管错误)$ firebase login
确认我已经登录问题:
我在我发现的有关 Firebase 托管部署的 SO 线程中没有看到此错误。请帮忙提供有关如何解决此问题的建议。
最诚挚的问候, 罗伯特
我是操作员,今天早上我就开始工作了。
prod
文件夹重命名为 prod-copy
,然后从一个空的 prod
文件夹开始,然后将 prod-copy
文件夹中的文件夹一一复制到 prod
中,每次都进行部署。prod
并每次部署。这样做,我能够部署整个网站我测试了我的互联网上传速度,为6Mbps。显然,它的速度足够快,因为我能够上传所有内容。如果需要将上传内容分解为更小的块,Firebase 就会出现问题。