[英]Grunt task not found
I have a little problem with Grunt. 我对Grunt有一点问题。 I have grunt-cli v0.1.9 installed globally and grunt v0.4.1 installed locally
我已经在全局安装了grunt-cli v0.1.9,在本地安装了grunt v0.4.1
Here is my simple Gruntfile.js : 这是我简单的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.
警告:找不到任务“ hello”。 Use --force to continue.
使用--force继续。
Can somebody tell me what is the problem? 有人可以告诉我这是什么问题吗?
假设您已安装npm,建议您尝试以下操作:
npm install grunt-contrib-uglify
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.