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?

error: open("node_modules/.bin/loose-envify"): Invalid argumentの対処法

Posted at

症状

Gitから新たにpullしたディレクトリから、データの更新をするために「git add -A」をしたところ、下記のエラーが発生しました。
エラーメッセージ
git add -A
error: open("node_modules/.bin/loose-envify"): Invalid argument
error: unable to index file 'node_modules/.bin/loose-envify'
fatal: updating files failed

翻訳すると、

翻訳
エラー: open("node_modules/.bin/loose-envify"): 無効な引数
エラー: ファイル「node_modules/.bin/loose-envify」のインデックスを作成できません
致命的: ファイルの更新に失敗しました

node_modules/binの下にあるはずのloose-envifyが開けないと言っているようです。
構成を確認したところ、bin以下に該当のファイルは存在しませんでした。

解決方法

npm installをして解決しました。

Gitからプロジェクトをアップする際に、.gitignoreでnode_moduleがない状態でアップされます。その状態のプロジェクトをダウンロードすると、node_moduleがないプロジェクトがダウンロードされます。

その状態でコードを変更しPUSHして、今回nodeがないよと怒られたみたいです。

参考

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?