我曾尝试在没有使用sudo的情况下安装包,结果搞乱了node和npm的安装和卸载。现在我无法在Webstorm中使用Grunt面板。
错误信息如下:
grunt --no-color --gruntfile /Users/max/repos/cb/Gruntfile.js --tasks /Applications/WebStorm.app/plugins/JavaScriptLanguage/grunt_js/tasks _intellij_grunt_tasks_fetcher
Cannot run program "grunt" (in directory "/Users/max/repos/cb"): error=2, No such file or directory
Looks like the grunt command isn't in your system path.
In order to view/run tasks, you need to install Grunt's command line interface globally:
npm install -g grunt-cli
For more information, please see http://gruntjs.com/getting-started
但是奇怪的是我可以从终端运行grunt,甚至在Webstorm中也可以。
截图:请注意我已经安装了grunt-cli
。