按照官网的步骤来安装的:
当创建了已经项目,项目中已经包含了gruntfile.js和packge.json等文件,当时在项目下执行grunt时候出现了下班错误提示,在node_modules中已经存在了grunt和grunt-cli
grunt-cli: The grunt command line interface. (v0.1.9)
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