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 1 year has passed since last update.

【メモ】未使用の依存関係をアンインストール:npm-check

Last updated at Posted at 2024-02-12

便利ツール npm-check を利用した。

経緯

EAS buildでアプリがクラッシュした。
クラッシュレポートを確認したところ、とあるパッケージが原因に見えた。
確認すると、使っていないパッケージだった。ほかにも使っていないパッケージがApp.jsに残っていないか確認しようと思った。

npm-check

古い依存関係、間違った依存関係、未使用の依存関係を確認します。

あ、未使用の依存関係以外も教えてくれるのね。

使い方

  1. npm install -g npm-check

  2. npm-check
    いろいろ出力されるが、NOTUSEDのパッケージに注目していく。
    image.png

  3. npm uninstall package_name
    コード内でも記載がないことを確認して、1つずつパッケージをアンインストールした。

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?