2
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?

AI「firebase: command not foundがGithub Actionsで表示されるんですね。ではnpm i -g firebase-toolsするステップを追加しましょう」私「嫌です」

2
Last updated at Posted at 2026-09-12

はじめに

  • firebase command not found github actionsとかで検索したらこんなのが出てきた

AI.png

問題

  • package.jsonに "firebase-tools": "^15.30.0", を登録している。特定のlockfile固定じゃないにしても、node_modulesのものを使ってほしいのでグローバルインストールしたくない

解決

  • 以下のようにPATHを通したコマンドではなく、絶対パスで実体を実行することで解決
      - name: Firebase Deploy
        run: ./node_modules/.bin/firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}

終わりに

  • ローカルでwhichしたら /Users/username/Desktop/dir/reponame/node_modules/.bin/firebase にあるとのことだったので使えるようにした
  • Github Actionsで使っているubuntu-latest環境内では、firebaseコマンドはなかったみたい。別記事に書くがwhichしてわかった
  • 割と今回のAIみたいなことをやっている記事もあるし、AIのアウトプットも気をつけないと動くからAIは賢いけど取扱注意だなと改めて
    • 結局ビジネスを動かすプロダクトになると、今回みたいなことが問題になったとして事業上ボトルネックにならないなら時間を割けない。しかし一瞬でリスクなくあるべき形にできるエンジニアなら信頼されてアプローチできて低コストでリスクを抑えられると言う意味で、技術力は大事だろうな
  • 文脈なしではなく、ちゃんと聞けばAIは欲しい答えをくれたのだろうなと思う
  • 解像度高くないがやっぱりCICDはこのバイナリってハッシュとかロックファイルとかできるだけ明確に指定した方がいい気がする。セキュリティ面でも
2
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
2
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?