簡體   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