A valid Gruntfile could not be found. Please see the getting started guide for more information on h

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/monica1_1/article/details/80888230
报错:A valid Gruntfile could not be found. Please see the getting started guide for
more information on how to configure grunt: http://gruntjs.com/getting-started

Fatal error: Unable to find Gruntfile.

解决办法:在当前目录下添加一个Gruntfile.js文件

// 包装函数
module.exports = function(grunt) {
    // 任务配置
    grunt.initConfig({
        'hello-world':{}
    });
    // 自定义任务
    grunt.registerTask('hello-world', 'My "asyncfoo" task.', function() {
        grunt.log.writeln('hello world');
    });
    grunt.registerTask('default', ['hello-world']);
};

就可以了。

java交流群:681223095

关注公众号,更多学习内容给予推送,争取每日更新




猜你喜欢

转载自blog.csdn.net/monica1_1/article/details/80888230
今日推荐