1
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 5 years have passed since last update.

nuxt generateした時にエラーが発生したらビルドを失敗させたい

1
Posted at

背景

github actionsを使ってCDを設定していた。
nuxt generate時にエラーが発生していたが、ビルド自体は失敗していなかった為そのままデプロイされていた。

Errorは吐いているがStep自体は成功してしまっている。
スクリーンショット 2021-02-03 11.25.25.png

環境

nuxt v2.14.4以降

対処法

nuxt generate コマンドに --fail-on-error というoptionを追加すればfailしてくれるらしい。

nuxt generate --fail-on-error

公式ドキュメントにしっかり書いてありました。。 [エラー時の失敗(Fail on Error)](https://ja.nuxtjs.org/docs/2.x/get-started/commands/#%E3%82%A8%E3%83%A9%E3%83%BC%E6%99%82%E3%81%AE%E5%A4%B1%E6%95%97%EF%BC%88fail-on-error%EF%BC%89)
1
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
1
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?