發表文章

目前顯示的是 12月, 2023的文章

firebase functions v2(javascript)如何設定部屬區域(deploy region)

 在code裡面引用setGlobalOptions 函數來設定 const { setGlobalOptions } = require ( "firebase-functions/v2" ); setGlobalOptions ({ region : "asia-east1" });

解決Firebase整合Next.js部屬(deploy)的permission問題

圖片
  這是在轉移之前寫的next.js功能到其他firebase專案時發生的權限問題 摘要錯誤訊息如下: i  functions: creating Node.js 18 (2nd Gen) function firebase-frameworks-***:ssr***(asia-east1)...     Unable to retrieve the repository metadata for projects/ *** /locations/asia-east1/repositories/gcf-artifacts. Ensure that the Cloud Functions service account has 'artifactregistry.repositories.list' and 'artifactregistry.repositories.get' permissions. You can add the permissions by granting the role 'roles/artifactregistry.reader'.     Functions deploy had errors with the following functions:             firebase-frameworks- *** :ssr***(asia-east1) 

解決ffmpeg轉檔遭遇error: libx264 width not divisible by 2

圖片
解決ffmpeg轉檔遭遇錯誤 [libx264 @ 0x6a371c0] width not divisible by 2 (861x909) [vost#0:0/libx264 @ 0x6a36dc0] Error initializing output stream: Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!

使用docker compose建置(build)hugo靜態網站

圖片
Hugo是一套以golang語言撰寫可快速建置靜態網站的框架,官方副標如下: The world’s fastest framework for building websites Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again. 而近期幫忙建置 中華易經天書三式協會網站 https://ichingtrilogy.com 即使用hugo來完成。 使用hugo建置網站的主程式需要使用golang,所需版本與我本機環境golang會有衝突,就有必要透過container來跑另一個版本golang來建置網站。而compose又提供一個簡單指令docker compose up就能完成