我先移除了旧版的grunt,然后安装了新版的grunt,但是遇到了如下错误:
D:\www\grunt-test\grunt grunt-cli: The grunt command line interface. (v0.1.4)
Fatal error: Unable to find local grunt.
如果你看到这个消息,可能是因为Gruntfile文件不存在,或者grunt没有被本地项目安装。有关安装和配置grunt的更多信息,请参阅入门指南:http://gruntjs.com/getting-started
这是因为系统路径中没有grunt的引用吗?还是其他原因?我已经试过多次重新安装。
npm install grunt -g
- elclanrsGruntfile.js
文件? - Simon Boudriasnpm install grunt --save-dev
。这将会把最新版本添加到你的package.json
文件中。 - Romainnpm install
命令就可以解决! - poshaughnessy