regepanのはてなブログ

個人的なメモ帳レベルの文章。

Gruntfile.jsあるのにUnable to find local grunt.と言われる。

このエラー文言いい加減に改善して欲しい。意味がわからないので。

$ grunt
grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

これが出る。
結局npm installを何回か繰り返したり(たぶんネットワークの問題でインストールに失敗してる。)、中途半端にダウンロードされてるnpm packageを一度削除して再度npm installしたらgruntコマンドが通るようになった。やれやれ。2016年も半分終わりましたがなかなかgruntは安定しないですな。もしかしてみんなもう使ってないんだろうか。