Giter Site home page Giter Site logo

Comments (10)

otoyo avatar otoyo commented on May 17, 2024 1

@okash1n 情報ありがとうございます。引き続き調査進めます。

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024 1

#72 で修正したので同じ症状の方取り込んで試していただけますと幸いです。

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024 1

原因

0.3.0でNOTION_API_SECRETなどの環境変数の読み込みを process.env 経由に変更したが、.env に書かれた環境変数は import.meta.env 経由でしか読み込めなかった。
https://docs.astro.build/ja/guides/environment-variables/

自身は .env を使っていなかったため最初再現しなかった。

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024 1

ご報告ありがとうございます!よかったです!

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024

デバッグ

  1. node_modules/@notionhq/client/build/src/Client.js に下記を追加
    L339
  try {
+     console.log(url.toString())
      const response = ...
  1. yarn dev して /blog を開く
  2. yarn dev したターミナルに出力されたURLが正しいかどうか確認

URLは https://api.notion.com/v1/databases/c92f540ccb694c83aed7f890c27fcd5d/query のようになっているはず。

from astro-notion-blog.

okash1n avatar okash1n commented on May 17, 2024

先程初めて使わせていただきました。 .evn には NOTION_API_SECRET および DATABASE_ID を記載しましたが、Invalid request URL になります。

なお、Cloudflare側では問題なく表示されました。

環境はWin11、WSLです。

Cloudflareとローカルの差分は

Cloudflare: NODE_VERSION v16.13.0
ローカル: NODE_VERSION v19.2.0

だったのでそれかもしれません。ローカルのnodeのバージョン変えてリトライしてみようかと思います

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024

image

DATABASE_IDが入るところが空になっていることがわかった。

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024

.env を使用したところ再現した。
.env の内容が yarn dev で反映されてないのかもしれない。

from astro-notion-blog.

otoyo avatar otoyo commented on May 17, 2024

#72 で修正

from astro-notion-blog.

okash1n avatar okash1n commented on May 17, 2024

取り込んで問題なく表示されました!

from astro-notion-blog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.