LoginSignup
1
0

More than 3 years have passed since last update.

【grunt】ERR_STREAM_WRITE_AFTER_ENDの対処法【Mac】

Posted at

Introduce

gruntをインストールした際に、ERR_STREAM_WRITE_AFTER_ENDが出ました。
行き詰まったので、解決法を書いておきます。
この記事は、Homebrew, node, npmのインストール方法は説明致しません。

原因

こちらの記事によると、npmのバージョンが高い際にエラーが発生するようです。
npmのバージョンを5.6.0にダウングレードすることでgruntをインストールすることができました。

はじめに

最初に現在のnpmのバージョンを確認しましょう。

terminal
$ npm -v

バージョンが5.6.0の場合は、別の問題かと思われます。
また以下のエラーが出た方は、npmのインストールを行なってください。

terminal
-bash: grunt: command not found

解決法

npmを5.6.0にダウングレードします。

terminal
$ npm install npm@5.6.0 -g

npmのバージョンを確認します。

terminal
$ npm -v
5.6.0

npmのバージョンが5.6.0であることが確認できたら、gruntをインストールしましょう。

terminal
$ npm install -g grunt-cli

インストールが終わったら、gruntのバージョンを確認しましょう。

terminal
$ grunt --version
grunt-cli v1.3.2

バージョンが表示されたらインストール完了です。
私のgruntのバージョンはv1.3.2でしたが、異なるバージョンが表示されても問題ないかと思います。

参考にさせていただいたサイト

エラーの解決策   https://github.com/npm/npm/issues/19989
npmコマンドまとめ https://dev.nismit.me/others/npm-command-list

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