简体   繁体   中英

Grunt task not found

I have a little problem with Grunt. I have grunt-cli v0.1.9 installed globally and grunt v0.4.1 installed locally

Here is my simple Gruntfile.js :

'use strict';
module.exports = function(grunt) {
    grunt.registerTask('hello', 'My test task.', function() {
        grunt.log.writeln('Hello world');
    });
}

However, when I launch :

grunt hello

I have the following message :

Warning: Task "hello" not found. Use --force to continue.

Can somebody tell me what is the problem?

假设您已安装npm,建议您尝试以下操作:

npm install grunt-contrib-uglify

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM