[英]Grunt task not found
我對Grunt有一點問題。 我已經在全局安裝了grunt-cli v0.1.9,在本地安裝了grunt v0.4.1
這是我簡單的Gruntfile.js:
'use strict';
module.exports = function(grunt) {
grunt.registerTask('hello', 'My test task.', function() {
grunt.log.writeln('Hello world');
});
}
但是,當我啟動時:
grunt hello
我有以下消息:
警告:找不到任務“ hello”。 使用--force繼續。
有人可以告訴我這是什么問題嗎?
假設您已安裝npm,建議您嘗試以下操作:
npm install grunt-contrib-uglify
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.