otoyo/astro-notion-blog

public/notion のコピーでエラー

hkob opened this issue · 1 comments

hkob commented

不具合の概要

インライン画像が存在しないときに yarn build 時に cp でエラーになる。

再現方法

インライン画像がないページを準備して、yarn build する

エラーログ

yarn build の結果はこちら

(中略)
cp: public/notion/*: No such file or directory
 error   Command failed: cp -r public/notion/* /Users/hkob/Dropbox/astro/astro-notion-blog/dist/notion
  cp: public/notion/*: No such file or directory

  File:
    /src/integrations/public-notion-copier.ts:15:29

期待する挙動

外部リンク画像しか使っていない場合には、public/notion にはファイルが一つも生成されないので、その時にエラーにならないようにしたい。

リポジトリとブランチ名

main

デスクトップ環境

  • OS: macOS
  • ブラウザ: Arc

追加情報

cp -r public/notion hogehoge/dist という感じで上のフォルダにコピーすればいいと思います。そうすれば上の mkdir の作業も必要なくなると思います。

otoyo commented

ご報告ありがとうございます。
#87 で対応しました。