usuyuki / portfolio_2023_spring

6代目ポートフォリオ(うすゆきどっとねっと)です。SvelteKit製。
https://usuyuki.net
2 stars 0 forks source link

[🐛Bug]:本番ビルドだとGhostAPIが叩けなくなる #20

Open usuyuki opened 1 year ago

usuyuki commented 1 year ago

🐛 概要

devでは動くがビルドするとGhostAPIで記事引っ張れなくなる

原因

NotionAPIは問題ないのでenvの値読めてないとかでもなさそう

備考

usuyuki commented 1 year ago

ずっと謎。

usuyuki commented 1 year ago

出ているエラーが

Error: Adapter 'http' is not available in the build
    at Object.getAdapter (worker.js:3414:17)
    at Axios.dispatchRequest (worker.js:2054:28)
    at Axios.request (worker.js:3552:37)
    at Axios.<computed> [as get] (worker.js:3571:21)
    at Function.wrap [as get] (worker.js:1571:15)
    at defaultMakeRequest (worker.js:3853:29)
    at makeApiRequest (worker.js:2311:12)
    at Object.browse (worker.js:2265:14)
    at getRecentArticle (worker.js:3883:49)
    at load2 (worker.js:3912:33) {
  stack: Error: Adapter 'http' is not available in the buil…rker.js:3883:49)
    at load2 (worker.js:3912:33),
  message: Adapter 'http' is not available in the build
}                   

なのでGhostのSDK側ちゃんと読んでみないとわからない可能性が高い

usuyuki commented 5 months ago

これcloudflareからみたら同一ネットワークだから解決できないとかある?? blogapi→かごや portfolio→cloudflare なので問題ない気がするが