繁体   English   中英

部署 firebase 文件超时

[英]Timeout on deploying firebase files

I have a simple static HTML and CSS website, a total of 19 files, when I use firebase deploy for the first time it uploads all files except 3 (which I don't know what are they), and then I use firebase deploy again我收到这个错误并超时

Error: Task 746db75fe2e30f7db8e598da508ea0151037c4fa9ee122daec252dc18fbb8662 failed: retries exhausted after 6 attempts, with error: Timeout reached making request to https://upload-firebasehosting.googleapis.com/upload/sites/xxxx/versions/0e578bbd3fa0f905/files/746db75fe2e30f7db8e598da508ea0151037c4fa9ee122daec252dc18fbb8662

我的 firebase 版本是10.0.1
我的节点版本是17.3.0

执行以下可能有助于解决问题的步骤:

  • 删除node modules并重新安装它们。
  • 删除firebase files (.firebase, firebase.json)
  • 通过"npm i -g firebase-tools"更新 Firebase CLI
  • 通过"firebase login"登录到您的帐户
  • 通过"firebase init hosting"初始化项目
  • 最后通过"firebase deploy --only hosting"进行部署

您还可以参阅文档以获取有关 Firebase 托管的更多详细信息。

在尝试部署 firebase 功能并在 WSL2 中托管时,我遇到了(不完全相同但)类似的错误。 我尝试安装不同的 firebase-tools 版本,然后注销然后再次登录,没有任何效果。

事实证明, WSL2 DNS 问题导致了这个问题。

所以如果你在 WSL2 后面部署 firebase 试试这个( 信用):

1. Create a file: /etc/wsl.conf.
2. Put the following lines in the file
[network]
generateResolvConf = false
3. In a cmd window, run wsl --shutdown
4. Restart WSL2
5. Create a file: /etc/resolv.conf. If it exists, replace existing one with this new file.
6. Put the following lines in the file
nameserver 8.8.8.8

如果/etc/resolv.conf在您每次重新启动 WSL2 时都被删除,并且您在 Windows 11 上,请将这些行添加到上述/etc/wsl.conf文件的末尾。

[boot]
command = "printf 'nameserver 8.8.8.8\nnameserver 4.4.4.4' > /etc/resolv.conf"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM