首页 > 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
应该是Gruntfile丢失了,
尝试了重新安装也没用。怎么解决呢。。。各位。。。系统macOSX


cd 到项目根目录

npm install


Gruntfile.js是自己写的Grunt配置文件,是需要自己写的!!!


node环境变量配置有问题


这个错跟Gruntfile无关,如果没有Gruntfile的话grunt会提示找不到这个文件的。
你这个错事没有本地grunt啊,在项目目录执行:

$ npm install grunt --save-dev
【热门文章】
【热门文章】