Coder Social home page Coder Social logo

otoyo / easy-notion-blog Goto Github PK

View Code? Open in Web Editor NEW
233.0 5.0 100.0 2.07 MB

✍️ Let's start your own Notion Blog easily. / Notion Blogを始めましょう!

Home Page: https://easy-notion-blog-otoyo.vercel.app/blog

License: MIT License

JavaScript 5.13% TypeScript 83.82% CSS 11.05%
notion notion-blog notion-api blog cms nextjs-blog nextjs vercel

easy-notion-blog's Issues

同じリポジトリ使用中の記事をbookmarkするとogImageが発行されない

easy-notion-blogを使う人同士で記事をbookmarkした際、画像を取り込めていない事に気づきました。

#91
再びの投稿失礼しますm(_ _)m

🔽notion
スクリーンショット 2022-07-14 12 22 33

🔽ブログで表示
スクリーンショット 2022-07-14 12 22 54

🔽Twitterで確認_validator
スクリーンショット 2022-07-14 12 25 29

🔽Twitterで打ってみる
スクリーンショット 2022-07-14 12 31 39

🔽demoサイト以外の記事で試す_validator
スクリーンショット 2022-07-14 12 32 40
スクリーンショット 2022-07-14 12 33 29

🔽Twitterで打ってみる
スクリーンショット 2022-07-14 12 35 04
スクリーンショット 2022-07-14 12 34 51


記事に埋め込んだbookmarkの画像が発行されない問題...

なかなか難しいことだと思いますのでお時間あるときにでも何か術があれば...と願っておりますm(_ _)m

相談:image/next により生じる画像高さの余白

困っていること

記事内(image block)にその都度サイズが異なり予めサイズを統一できない画像(スクショ)を埋め込むと横長・縦長の画像に異様な余白が生じてしまいます。

やったこと

  • 高さの値を修正し、横長・縦長画像の表示のされ方を見ながら丁度いい値は無いか調べました。
    👉 「どっちを取るか」の判断となり縦長画像を見やすく高さを設定すれば横長画像は上下余白が大きくなり画像として見にくくなってしまっています。。。。

スクリーンショット 2022-02-23 12 39 09

詳細:herohoro/issues/5
  • 直接importすれば画像サイズを指定しなくていい・・といった記事を見つけ検討してみました。
    👉 publicフォルダに収納する画像ではないので意味が違うなと思い八方塞がりになりました。

まとめ

予め画像のサイズを指定するのは難しい場合に読者の見やすい画像設定をする方法はありませんか???

ビルドでエラーが出てしまいデプロイできずご教授いただけますと幸いです…!

下記の手順に従いVercelでデプロイしようとしたんですがエラーになってしまいました
https://github.com/otoyo/easy-notion-blog/blob/main/README.ja.md#%E3%82%AF%E3%82%A4%E3%83%83%E3%82%AF%E3%82%B9%E3%82%BF%E3%83%BC%E3%83%88

ビルド内容は下記のとおりです

10:31:52.794 Cloning github.com/sugawaraplus/easy-notion-blog (Branch: main, Commit: e370b16)
10:31:53.470 Cloning completed: 675.105ms
10:31:53.508 Analyzing source code...
10:31:53.709 Installing build runtime...
10:31:56.532 Build runtime installed: 2.822s
10:31:56.990 Looking up build cache...
10:31:57.125 Build Cache not found
10:31:57.407 Installing dependencies...
10:31:57.745 yarn install v1.22.17
10:31:57.842 [1/4] Resolving packages...
10:31:58.344 [2/4] Fetching packages...
10:32:31.623 [3/4] Linking dependencies...
10:32:31.627 warning " > @zeit/[email protected]" has incorrect peer dependency "react@^16.8.3".
10:32:31.627 warning " > @zeit/[email protected]" has incorrect peer dependency "react-dom@^16.8.3".
10:32:31.628 warning " > [email protected]" has unmet peer dependency "prop-types@^15.5.4".
10:32:31.629 warning " > [email protected]" has incorrect peer dependency "react@^15.0.0 || ^16.0.0".
10:32:31.629 warning " > [email protected]" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0".
10:32:31.630 warning "react-twitter-embed > [email protected]" has unmet peer dependency "enzyme@^3.0.0".
10:32:31.630 warning "react-twitter-embed > [email protected]" has incorrect peer dependency "react@^16.0.0-0".
10:32:31.630 warning "react-twitter-embed > [email protected]" has incorrect peer dependency "react-dom@^16.0.0-0".
10:32:31.631 warning "react-twitter-embed > enzyme-adapter-react-16 > [email protected]" has incorrect peer dependency "[email protected] || 0.14.x || ^15.0.0-0 || ^16.0.0-0".
10:32:31.631 warning "react-twitter-embed > enzyme-adapter-react-16 > [email protected]" has incorrect peer dependency "react@^16.14.0".
10:32:31.632 warning "react-twitter-embed > enzyme-adapter-react-16 > enzyme-adapter-utils > [email protected]" has incorrect peer dependency "react@^0.14 || ^15.0.0 || ^16.0.0-alpha".
10:32:31.632 warning " > @typescript-eslint/[email protected]" has unmet peer dependency "@typescript-eslint/parser@^5.0.0".
10:32:49.101 [4/4] Building fresh packages...
10:32:49.715 Done in 51.98s.
10:32:49.743 Detected Next.js version: 12.0.10
10:32:49.745 Running "yarn run build"
10:32:50.115 yarn run v1.22.17
10:32:50.163 $ node scripts/set-blog-index-cache.js && next build && node scripts/expire-blog-index-cache.js
10:32:50.480 Cached 0 posts into /vercel/path0/.blog_index_data
10:32:51.344 Attention: Next.js now collects completely anonymous telemetry regarding usage.
10:32:51.345 This information is used to shape Next.js' roadmap and prioritize features.
10:32:51.345 You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
10:32:51.346 https://nextjs.org/telemetry
10:32:51.346  
10:32:51.400 info - Checking validity of types...
10:32:59.707 info - Creating an optimized production build...
10:33:19.377 info - Compiled successfully
10:33:19.377 info - Collecting page data...
10:33:19.808 Found cached posts.
10:33:19.813  
10:33:19.813 > Build error occurred
10:33:19.814 TypeError: Cannot read property 'Date' of undefined
10:33:19.815 at getStaticPaths (/vercel/path0/.next/server/pages/blog/before/[date].js:65:117)
10:33:19.816 at processTicksAndRejections (internal/process/task_queues.js:95:5)
10:33:19.816 at async buildStaticPaths (/vercel/path0/node_modules/next/dist/build/utils.js:497:31)
10:33:19.816 at async /vercel/path0/node_modules/next/dist/build/utils.js:640:119
10:33:19.817 at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:75:20) {
10:33:19.817 type: 'TypeError'
10:33:19.860 error Command failed with exit code 1.
10:33:19.861 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
10:33:19.875 Error: Command "yarn run build" exited with 1

他に必要な情報などあれば合わせてご教授願います!
よろしくお願いいたしますー!

質問:デフォルトogimageの設定

document-headコンポネントのurlOgImageの値に画像リンクを追記後
null部分を以下のように変更しました。

スクリーンショット 2022-02-10 14 17 49

herohoro@8fa6d3e

deploy直後にツイッターで確認してみましたが反映されずの状態で投稿させていだたいております。
少し待てば反映されますか?
それとも変更の仕方が間違えている部分がありますでしょうか?

テキストに日付またはリマインダーを挿入するとエラーが発生する

不具合の概要

日付またはリマインダーを挿入すると「return null」がないとエラーが出る

再現方法

パブリッシュでないテストページにて行った。

  1. テストページを作成する(slug,公開日付等の設定をする)
  2. 内容に「日付またはリマインダーを挿入する」
  3. yarn dev

スクリーンショット 2022-11-06 13 13 04

スクリーンショット 2022-11-06 13 13 23

エラーログ

スクリーンショット 2022-11-06 13 13 59

期待する挙動

mentionに対応していないので何も表示しない

スクリーンショット

エラーが発生している画面のスクリーンショットを添付します。
スクリーンショット 2022-11-06 13 14 56

リポジトリ

https://github.com/nuovotaka/notion-blog

デスクトップ環境

  • OS: [MacOS]
  • ブラウザ: [Brave]
  • ブラウザのバージョン: [ 1.45.118 Chromium: 107.0.5304.91(Official Build) (x86_64)]

追加情報

なし

TypeError [ERR_INVALID_URL]: Invalid URL

発生していること

2b92639 辺りでは起きなかったように思うのですが、現在masterの 95da4a5yarn dev を実行したところ、以下のエラーが発生します。

TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:371:5)
    at onParseError (node:internal/url:552:9)
    at new URL (node:internal/url:628:5)
    at Header (webpack-internal:///./src/components/header.tsx:24:17)
    at processChild (/Users/user2/code/easy-notion-blog/node_modules/react-dom/cjs/react-dom-server.node.development.js:3353:14)
    at resolve (/Users/user2/code/easy-notion-blog/node_modules/react-dom/cjs/react-dom-server.node.development.js:3270:5)
    at ReactDOMServerRenderer.render (/Users/user2/code/easy-notion-blog/node_modules/react-dom/cjs/react-dom-server.node.development.js:3753:22)
    at ReactDOMServerRenderer.read (/Users/user2/code/easy-notion-blog/node_modules/react-dom/cjs/react-dom-server.node.development.js:3690:29)
    at Object.renderToString (/Users/user2/code/easy-notion-blog/node_modules/react-dom/cjs/react-dom-server.node.development.js:4298:27)
    at Object.renderPage (/Users/user2/code/easy-notion-blog/node_modules/next/dist/server/render.js:736:46) {
  input: '/_next/static/webpack/07ea94bbe1acf6f4.webpack.hot-update.json',
  code: 'ERR_INVALID_URL'
}

再現手順

  1. git clone https://github.com/otoyo/easy-notion-blog
  2. yarn install
  3. yarn dev

※厳密には、forkした https://github.com/nitaking/easy-notion-blog にて fork元の最新化を行った際に事象は発生しました

解決策

  1. env.local に 以下を追加(READMEに加筆)
NEXT_PUBLIC_URL=http://localhost:3000/
  1. NEXT_PUBLIC_URLのデフォルト値を設定

私としては 2. NEXT_PUBLIC_URLのデフォルト値を設定 が適切かな、と思うのでそちらでdraft PRを作成しておきます。対応方針ご相談したいです!

bookmarkについて

'@dhaiwat10/react-link-preview'がうまく動作していないようです。
Notionでのbookmarkがことごとく表示されません。
どうしたらよろしいですか?

初期設定時に複製するNotionDBのSupport blocksの記事内の不具合

不具合の概要

NotionDBのテンプレート内のbookmarkブロックが異なるブロックになっている

再現方法

  1. NotionDBを複製して取り込む
  2. 初期設定を済ませVercelでDeploy
  3. サンプル記事「Support blocks」を開く
  4. Link Preview & Bookmarkの部分までスクロールすると表示されていない

修正前のNotion

スクリーンショット 2022-08-24 20 39 59

期待する挙動

bookmarkブロックを表示するために修正するとブログでも表示されました
スクリーンショット 2022-08-24 20 41 28

デスクトップ環境

  • OS: MacOS
  • ブラウザ: Chrome
  • ブラウザのバージョン: ??

追加情報

NotionDBを複製する際、アルパカ先生のいつものアイコンではないアイコンが表示されていましたが大丈夫でしょうか???
(アルパカ先生はアルパカでいてほしい願望ありです....(´・ω・`))

「easy-notion-blog」について

Issuesでの投稿失礼致します。

最近になってから、「easy-notion-blog」を利用させていただいております。
そしてその中で色々と分からないことがありまして、「クイックスタート」内のものでいくつかご質問をさせていただきます。

質問1】8番目の「ターミナルアプリ」というのはWindowsでいうと「Git Bash」でよろしいでしょうか?

質問2】9番目の「初期化スクリプトを実行します」という所で...

【DATABASE_ID=<YOUR_DATABASE_ID> NOTION_API_SECRET=<YOUR_NOTION_API_SECRET> ./scripts/init-database.sh】

を「Git Bash」に入力したのですが、以下のようになってしまうのですがどのようにすればよいでしょうか?

【$ DATABASE_ID=<YOUR_DATABASE_ID> NOTION_API_SECRET=<YOUR_NOTION_API_SECRET> ./scripts/init-database.sh
bash: YOUR_DATABASE_ID: No such file or directory】

自身がプログラミング及び、Githubの初心者故に本当の初期の初期段階(まず「初期化スクリプト」という言葉自体等々)で分からないという状態で大変申し訳ないのですが、是非ともご回答の方を宜しくお願い致します。

調査報告:notion上のテキスト・ブロック装飾反映の可否

【文字装飾】

  反映確認
テキスト
段落テキスト  
ブロック内改行  
空ブロック
・リスト
・子リスト  
To-doリスト  
Numリスト
Num子リスト  
color-block  
color-text  
h2タイトル
絵文字
画像
太字
下線文字
取り消し線文字
コード文字
inline-page  
table
toggleリスト  
子toggleリスト  
Quote
callout
inline-database  
codeblock
Web bookmark  
Video  
embed  
mention-page  
sync  
twitter embed  

notion上でよく使われる装飾

  • color block
  • color text
  • table
  • Web bookmark

あったら嬉しい装飾

  • twitter embed

Vercel上でのエラーログについて

Vercel」でデプロイする際に、以下の複数のエラーが発生してしまいました。

(以下のスクショ画像の掲載を失礼致します。)

スクリーンショット (149)

スクリーンショット (151)
Environment VariablesでのNOTION_API_SECRETDATABASE_IDの入力間違いがないか等も見直してみたのですが、

最終的にはError: Command "yarn run build" exited with 1という表示に何度もなってしまいました。

この件に関しましての、アドバイス等々を頂けましたら幸いです。

React v16 に依存しているライブラリがあり `npm install` に失敗する

はじめまして、自分のブログに導入してみようと思い検証しています。

問題の詳細

プロジェクト自体は React v17 を使用しているが、 @zeit/[email protected][email protected] が React v16 に依存しており npm install に失敗する。


プロジェクト内を検索したところ @zeit/react-jsx-parser については使用箇所が見当たらなかったのですがどこで使用されていますか?最終アップデートも3年前とかなり古いライブラリですので、代替となるライブラリとの入れ替えを検討した方がいいかと思いました。

また react-twitter-embed については最新のバージョンが 4.0.4 となっていますのでアップデートをした方がいいのではないかと思います。

ローカル保存版OgImageがブログ上で表示されない_他は表示確認済み

経緯

以前vercel Limitの打開をするためにPRしていただいた herohoro#13 から、

記事内でbookmarkをするとOgImageが表示されない...
といった不具合がありました。

私のリポジトリの影響かと思い、解決できるまで保留にし放置していました。

現象

他の方(八朔さん)も同じ現象になっていたことが分かりました。

スクリーンショット 2022-06-02 14 29 24

スクリーンショット 2022-06-02 14 32 38

スクリーンショット 2022-06-02 14 34 01

相談

問題は本家なのかどうかが判断しかねる状況だったためこちらに投稿させていただきました。
何か解決策がありましたら教えていただけるとありがたいです。

tag一覧ページの遷移でfirstPostのエラーにより遷移できず

唯一「easy-notion-blog_最新情報」というタグが10件以上あるので確認してみると、
ページへ移動するボタンの表示がされない状態でした。

開発画面上では問題ないです。
vercelでは怒られてしまいます....。

以下のようなエラーメッセージがタグ毎に表示される状態です。
スクリーンショット 2022-05-17 17 50 10

もしかすると取り込み漏れもあるかもしれません。(改造してますし...)

何か手がかりがありましたら教えていただけるとありがたいです。(´゚д゚`)

Vercelのデプロイで失敗します。助けて欲しいです。

不具合の概要

Vercelのデプロイで失敗する。

再現方法

下記のREADME.jaの手順に従い、Vercelでデプロイ
https://github.com/otoyo/easy-notion-blog/blob/main/README.ja.md

ただし手順の7のみ記述の意味がわからなかったので以下のように行った
Import Third-Party Git Repository →
からhttps://github.com/otoyo/easy-notion-blogを入力してContinue
Create Git Repositoryの中の
Git Scope: 自分のGit acount
Repository Name: easy-notion-blog
としてCreate
すると、環境変数を入力する前にDeployが始まり、失敗に終わりますが、
再度Environment Variablesの
key: NOTION_API_SECRET
Value: database ID
としてsaveしredeploymentするとやはり失敗に終わります。

エラーログ

以下のようになります。

16:18:08.630 Cloning github.com/ronginooth/easy-notion-blog (Branch: main, Commit: 6dca99f)
16:18:08.636 Skipping build cache since Vercel CLI used --force option
16:18:09.187 Cloning completed: 556.253ms
16:18:09.575 Running "vercel build"
16:18:10.079 Vercel CLI 28.10.3
16:18:10.387 Installing dependencies...
16:18:10.747 yarn install v1.22.17
16:18:10.816 [1/4] Resolving packages...
16:18:11.098 [2/4] Fetching packages...
16:18:31.085 warning [email protected]: The engine "pnpm" appears to be invalid.
16:18:31.098 [3/4] Linking dependencies...
16:18:31.101 warning " > [email protected]" has unmet peer dependency "prop-types@^15.8.1".
16:18:31.101 warning " > @typescript-eslint/[email protected]" has unmet peer dependency "@typescript-eslint/parser@^5.0.0".
16:18:52.973 [4/4] Building fresh packages...
16:18:54.258 Done in 43.52s.
16:18:54.293 Detected Next.js version: 13.0.7
16:18:54.295 Running "yarn run build"
16:18:54.564 yarn run v1.22.17
16:18:54.590 $ node scripts/set-blog-index-cache.js && next build && node scripts/expire-blog-index-cache.js
16:18:54.849 @notionhq/client warn: request fail { code: 'unauthorized', message: 'API token is invalid.' }
16:18:54.851 /vercel/path0/node_modules/@notionhq/client/build/src/errors.js:162
16:18:54.852 return new APIResponseError({
16:18:54.852 ^
16:18:54.852  
16:18:54.852 APIResponseError: API token is invalid.
16:18:54.852 at buildRequestError (/vercel/path0/node_modules/@notionhq/client/build/src/errors.js:162:16)
16:18:54.852 at Client.request (/vercel/path0/node_modules/@notionhq/client/build/src/Client.js:342:54)
16:18:54.852 at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
16:18:54.852 at async exports.set (/vercel/path0/lib/notion/blog-index-cache.js:59:18) {
16:18:54.852 code: 'unauthorized',
16:18:54.852 status: 401,
16:18:54.852 headers: Headers {
16:18:54.853 [Symbol(map)]: [Object: null prototype] {
16:18:54.853 date: [ 'Sun, 08 Jan 2023 07:18:54 GMT' ],
16:18:54.853 'content-type': [ 'application/json; charset=utf-8' ],
16:18:54.853 'content-length': [ '87' ],
16:18:54.853 connection: [ 'close' ],
16:18:54.853 'set-cookie': [
16:18:54.853 'notion_browser_id=4c68d1ef-04cc-4345-b363-11ce4098fd8a; Domain=www.notion.so; Path=/; Expires=Mon, 08 Jan 2024 07:18:54 GMT; Secure',
16:18:54.853 'notion_check_cookie_consent=false; Domain=www.notion.so; Path=/; Expires=Mon, 09 Jan 2023 07:18:54 GMT; Secure'
16:18:54.853 ],
16:18:54.853 'content-security-policy': [
16:18:54.856 "script-src 'self' 'unsafe-inline' 'unsafe-eval' https://gist.github.com https://apis.google.com https://www.google.com https://www.gstatic.com https://cdn.amplitude.com https://api.amplitude.com https://hkfxbbdzib.notion.so https://widget.intercom.io https://js.intercomcdn.com https://static.zdassets.com https://api.smooch.io\t https://logs-01.loggly.com https://http-inputs-notion.splunkcloud.com https://cdn.segment.com https://analytics.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com https://embed.typeform.com https://admin.typeform.com https://public.profitwell.com https://static.profitwell.com js.sentry-cdn.com https://js.chilipiper.com https://platform.twitter.com https://cdn.syndication.twimg.com https://accounts.google.com https://www.googletagmanager.com https://www.googleadservices.com https://googleads.g.doubleclick.net https://api-v2.mutinyhq.io https://client-registry.mutinycdn.com https://client.mutinycdn.com https://user-data.mutinycdn.com https://cdn.metadata.io https://platformapi.metadata.io https://d2hrivdxn8ekm8.cloudfront.net https://d1lu3pmaz2ilpx.cloudfront.net https://dvqigh9b7wa32.cloudfront.net https://d330aiyvva2oww.cloudfront.net https://cdn.transcend.io https://cdn01.boxcdn.net https://cdn.sprig.com;connect-src 'self' data: blob: https://msgstore.www.notion.so wss://msgstore.www.notion.so ws://localhost:* ws://127.0.0.1:* https://notion-emojis.s3-us-west-2.amazonaws.com https://s3-us-west-2.amazonaws.com https://s3.us-west-2.amazonaws.com https://notion-production-snapshots-2.s3.us-west-2.amazonaws.com https://cdn.amplitude.com https://api.amplitude.com https://hkfxbbdzib.notion.so https://www.notion.so https://api.embed.ly https://js.intercomcdn.com https://api-iam.intercom.io https://uploads.intercomcdn.com wss://nexus-websocket-a.intercom.io https://ekr.zdassets.com https://ekr.zendesk.com\t https://makenotion.zendesk.com\t https://api.smooch.io\t wss://api.smooch.io\t https://logs-01.loggly.com https://http-inputs-notion.splunkcloud.com https://cdn.segment.com https://api.segment.io https://analytics.pgncs.notion.so https://api.pgncs.notion.so https://o324374.ingest.sentry.io https://checkout.stripe.com https://js.stripe.com https://cdn.contentful.com https://preview.contentful.com https://images.ctfassets.net https://www2.profitwell.com https://tracking.chilipiper.com https://api.chilipiper.com https://api.unsplash.com https://boards-api.greenhouse.io https://accounts.google.com https://oauth2.googleapis.com https://www.googletagmanager.com https://analytics.google.com https://www.googleadservices.com https://googleads.g.doubleclick.net https://region1.google-analytics.com https://region1.analytics.google.com https://www.google-analytics.com https://api-v2.mutinyhq.io https://client-registry.mutinycdn.com https://client.mutinycdn.com https://user-data.mutinycdn.com https://cdn.metadata.io https://platformapi.metadata.io https://d2hrivdxn8ekm8.cloudfront.net https://d1lu3pmaz2ilpx.cloudfront.net https://dvqigh9b7wa32.cloudfront.net https://d330aiyvva2oww.cloudfront.net https://cdn.transcend.io https://api.statuspage.io https://pgncd.notion.so https://api.statsig.com https://statsigapi.net https://exp.notion.so https://file.notion.so https://api.box.com https://.mux.com https://api.sprig.com https://storage.googleapis.com https://cdn.sprig.com https://cdn.userleap.com;font-src 'self' data: https://cdnjs.cloudflare.com https://js.intercomcdn.com https://cdn01.boxcdn.net;img-src 'self' data: blob: https: https://platform.twitter.com https://syndication.twitter.com https://pbs.twimg.com https://ton.twimg.com https://region1.google-analytics.com https://region1.analytics.google.com https://.mux.com;style-src 'self' 'unsafe-inline' https://cdnjs.cloudflare.com https://github.githubassets.com https://js.chilipiper.com https://platform.twitter.com https://ton.twimg.com https://accounts.google.com https://cdn.transcend.io https://cdn01.boxcdn.net;media-src blob: https: http: https://file.notion.so https://*.mux.com;worker-src blob:;frame-
16:18:54.856 ],
16:18:54.856 'x-dns-prefetch-control': [ 'off' ],
16:18:54.857 'x-frame-options': [ 'SAMEORIGIN' ],
16:18:54.857 'strict-transport-security': [ 'max-age=5184000; includeSubDomains' ],
16:18:54.857 'x-download-options': [ 'noopen' ],
16:18:54.857 'x-content-type-options': [ 'nosniff' ],
16:18:54.857 'x-permitted-cross-domain-policies': [ 'none' ],
16:18:54.857 'referrer-policy': [ 'strict-origin-when-cross-origin' ],
16:18:54.857 'x-xss-protection': [ '0' ],
16:18:54.857 etag: [ 'W/"57-QCRLT3IovYEW+CkwyJQlFtiXiG8"' ],
16:18:54.857 vary: [ 'Accept-Encoding' ],
16:18:54.857 'cf-cache-status': [ 'DYNAMIC' ],
16:18:54.857 server: [ 'cloudflare' ],
16:18:54.857 'cf-ray': [ '7863297048a82c90-ORD' ]
16:18:54.857 }
16:18:54.857 },
16:18:54.857 body: '{"object":"error","status":401,"code":"unauthorized","message":"API token is invalid."}'
16:18:54.858 }
16:18:54.858  
16:18:54.858 Node.js v18.12.1
16:18:54.871 error Command failed with exit code 1.
16:18:54.871 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
16:18:54.892 Error: Command "yarn run build" exited with 1

他に必要な情報などあれば合わせてご教授願います!
よろしくお願いいたしますー!

Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'call')となる

不具合の概要

npm run devした際に下記のエラーが表示される。

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'call')

再現方法

README.jaの手順通りに実行(1/10時点)
https://github.com/otoyo/easy-notion-blog/blob/main/README.ja.md

エラーログ

下記はエラーメッセージの全文になります。

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'call')

Call Stack
options.factory
file:///C:/www_dev/notion-blog-test/easy-notion-blog/.next/static/chunks/webpack.js (722:31)
__webpack_require__
/_next/static/chunks/webpack.js (37:33)
fn
file:///C:/www_dev/notion-blog-test/easy-notion-blog/.next/static/chunks/webpack.js (377:21)
require
node_modules\next\dist\client\link.js (7:31)
./node_modules/next/dist/client/link.js
file:///C:/www_dev/notion-blog-test/easy-notion-blog/.next/static/chunks/app/layout.js (126:1)
options.factory
/_next/static/chunks/webpack.js (722:31)
__webpack_require__
file:///C:/www_dev/notion-blog-test/easy-notion-blog/.next/static/chunks/webpack.js (37:33)
fn
/_next/static/chunks/webpack.js (377:21)
__webpack_require__
node_modules\next\dist\client\app-index.js (26:16)
requireModule
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (142:0)
initializeModuleChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (427:0)
readChunk
node_modules\next\dist\compiled\react-server-dom-webpack\client.js (252:0)
mountLazyComponent
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (23079:0)
beginWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (24792:0)
beginWork$1
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (32185:0)
performUnitOfWork
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (31082:0)
workLoopSync
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (30891:0)
renderRootSync
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (30856:0)
recoverFromConcurrentError
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (30109:0)
performConcurrentWorkOnRoot
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (29996:0)
workLoop
node_modules\next\dist\compiled\scheduler\index.js (10:3921)
flushWork
node_modules\next\dist\compiled\scheduler\index.js (10:3629)
MessagePort.performWorkUntilDeadline
node_modules\next\dist\compiled\scheduler\index.js (10:1811)

スクリーンショット

image

追加情報

過去に以下でも同じような課題が挙がっていたため、
「.next」ディレクトリを削除する方法を試しましたが改善されませんでした。
#19

ご教示いただけると助かります!

ToDo to version 1.0

v0.13

  • Support ToDo blocks #128
  • Support "Table of Contents" blocks #130
  • Add more tests #131
  • Define API Response interfaces #132
  • Delete useless files #133

1.0.0

  • Support Semantic Versioning
  • Update Next.js to 13

Twitterカードのブックマークが上手く表示されていない

不具合の概要

Twitter ブックマークが画像付きで表示されない。
仕様でしょうか?

期待しているのは下記のような画像付きのブックマークです。
スクリーンショット 2022-08-18 11 43 04

再現方法

easy-notion-blog.nuovotaka.com
の 
https://easy-notion-blog.nuovotaka.com/blog/twitter-card

エラーログ

Functions の内容

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog/sick-egpa-part35.json
11:24:25:15

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog/smartphonepoach2-leathercraft.json
11:24:24:68

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog/tag/blog.json
11:24:24:58

[GET] /_next/data/j1dAM7xsus_wvqTtJ4HOY/blog.json
11:24:24:58

[GET] /api/url-metadata?url=https://twitter.com/nuovotaka/status/1559998318939439108?s=21&t=rwsON9JfEczxmXI7z1F5eA
11:24:24:34
start: 1660789464533,
socket: 1660789464533,
lookup: 1660789464533,
connect: 1660789464591,
secureConnect: 1660789464607,
upload: 1660789464608,
response: 1660789464628,
end: 1660789464629,
error: undefined,
abort: undefined,
phases: {
wait: 0,
dns: 0,
tcp: 58,
tls: 16,
request: 1,
firstByte: 20,
download: 1,
total: 96
}
},
options: {
request: undefined,
agent: { http: undefined, https: undefined, http2: undefined },
h2session: undefined,
decompress: true,
timeout: {
connect: undefined,
lookup: undefined,
read: undefined,
request: undefined,
response: undefined,
secureConnect: undefined,
send: undefined,
socket: undefined
},
prefixUrl: '',
body: undefined,
form: undefined,
json: undefined,
cookieJar: undefined,
ignoreInvalidCookies: false,
searchParams: undefined,
dnsLookup: undefined,
dnsCache: undefined,
context: {},
hooks: {
init: [],
beforeRequest: [],
beforeError: [],
beforeRedirect: [],
beforeRetry: [],
afterResponse: []
},
followRedirect: true,
maxRedirects: 10,
cache: undefined,
throwHttpErrors: true,
username: '',
password: '',
http2: false,
allowGetBody: false,
headers: {
'user-agent': 'got (https://github.com/sindresorhus/got)',
'accept-encoding': 'gzip, deflate, br'
},
methodRewriting: false,
dnsLookupIpVersion: undefined,
parseJson: [Function: parse],
stringifyJson: [Function: stringify],
retry: {
limit: 2,
methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
statusCodes: [
408, 413, 429, 500,
502, 503, 504, 521,
522, 524
],
errorCodes: [
'ETIMEDOUT',
'ECONNRESET',
'EADDRINUSE',
'ECONNREFUSED',
'EPIPE',
'ENOTFOUND',
'ENETUNREACH',
'EAI_AGAIN'
],
maxRetryAfter: undefined,
calculateDelay: [Function: calculateDelay],
backoffLimit: Infinity,
noise: 100
},
localAddress: undefined,
method: 'GET',
createConnection: undefined,
cacheOptions: {
shared: undefined,
cacheHeuristic: undefined,
immutableMinTimeToLive: undefined,
ignoreCargoCult: undefined
},
https: {
alpnProtocols: undefined,
rejectUnauthorized: undefined,
checkServerIdentity: undefined,
certificateAuthority: undefined,
key: undefined,
certificate: undefined,
passphrase: undefined,
pfx: undefined,
ciphers: undefined,
honorCipherOrder: undefined,
minVersion: undefined,
maxVersion: undefined,
signatureAlgorithms: undefined,
tlsSessionLifetime: undefined,
dhparam: undefined,
ecdhCurve: undefined,
certificateRevocationLists: undefined
},
encoding: undefined,
resolveBodyOnly: false,
isStream: false,
responseType: 'text',
url: URL {
href: 'https://twitter.com/nuovotaka/status/1559998318939439108?s=21',
origin: 'https://twitter.com',
protocol: 'https:',
username: '',
password: '',
host: 'twitter.com',
hostname: 'twitter.com',
port: '',
pathname: '/nuovotaka/status/1559998318939439108',
search: '?s=21',
searchParams: URLSearchParams { 's' => '21' },
hash: ''
},
pagination: {
transform: [Function: transform],
paginate: [Function: paginate],
filter: [Function: filter],
shouldContinue: [Function: shouldContinue],
countLimit: Infinity,
backoff: 0,
requestLimit: 10000,
stackAllItems: false
},
setHost: true,
maxHeaderSize: undefined,
signal: undefined,
enableUnixSockets: true
}
}

期待する挙動

Notionでtwitterを埋め込んだモノの下にブックマークがあります。そのブックも表示させたい。
twitter ブックマークの表示(今回は画像付き)

スクリーンショット

・Notionのスクショ
スクリーンショット 2022-08-18 11 16 02

スクリーンショット 2022-08-18 11 16 29

スクリーンショット 2022-08-18 11 16 50

・エラーが発生している画面のスクリーンショットを添付します。
スクリーンショット 2022-08-18 11 13 41

リポジトリとブランチ名

もし Fork した easy-notion-blog でエラーが発生している場合には、あなたのリポジトリの URL とブランチ名を記載します。
https://github.com/nuovotaka/easy-notion-blog
main ブランチ #111

デスクトップ環境

追加情報

他に伝えておくべき追加情報があれば記述します。

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.