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

【amplify】デプロイ失敗の解消法

Posted at

エラー内容

ビルドの段階でエラーがいくつか発生しました。

1つ目

tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.

package-lock.jsonを削除したら、このエラーは表示されなくなりました。

2,3つ目

warning " > @testing-library/user-event@12.8.3" has unmet peer dependency "@testing-library/dom@>=7.21.4".

warning "recharts > react-smooth@2.0.0" has unmet peer dependency "prop-types@^15.6.0".

https://qiita.com/hayato94087/items/82c36b4063ef935515fa
こちらの記事にこのエラーの解消方法が載っていました。

4つ目

2021-07-21T07:11:33.617Z [INFO]: ./src/App.tsx
                                 Cannot find file './components/currentWeather/CurrentWeather' in './src'.
2021-07-21T07:11:33.634Z [WARNING]: error Command failed with exit code 1.

githubのリモートリポジトリを見たらCurrentweather.tsxと、wが小文字になっていました。
それがローカルのファイルと整合性が取れなくて、エラーになっていたみたいです。

変更方法

githubのCurrentWeather.tsxのファイルを開くと、そのファイルを編集できます。
そこで、Currentweather.tsxCurrentWeather.tsxに書き換え、保存しました。

その後、一度ローカルでgit pullをして、readmeなどを少し変更して、再度pushし、amplifyを再デプロイしたところ、無事にデプロイが完了しました。

まとめ

以上が今回のエラーとその改善方法になります。

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?