gpt4 book ai didi

javascript - 找不到 Grunt 任务

转载 作者:行者123 更新时间:2023-11-30 06:30:36 25 4
gpt4 key购买 nike

我对 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

我有以下消息:

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

谁能告诉我这是什么问题?

最佳答案

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

npm install grunt-contrib-uglify

关于javascript - 找不到 Grunt 任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17895979/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com