0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Gatsby + TyporaでMarkdownファイルを保存する時にエラー落ちするのを防ぐ

Last updated at Posted at 2020-11-19

元記事:genkitech.net

現象

gatsby develop でホットリロード動作中に、TyporaでMarkdownファイルを編集して保存すると、以下の様なエラーが出て落ちる場合がありました。

info added file at C:\Users\〇〇〇\.~index.md
Failed to validate error Error [ValidationError]: "errno" is not allowed. "syscall" is not allowed. "path" is not allowed

原因と解決

ぱっと見原因はTyporaが「.~」を頭に付けた変なファイルを生成している事のようなので、以下の様に「gatsby-source-filesystem」の「ignore」オプションを設定してあげることで落ちなくなりました。

gatsby-config.js
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/contents`,
        name: `contents`,
        ignore: [`**/\.*`],
      },
    },

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?