grunt-contrib-htmlminプラグインを使用しています。これは私Gruntfile.jsのように見える方法です:
module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    htmlmin: {
      dist: {
        options: {
          removeComments: true,
          collapseWhitespace: true
        },
        files: {
          '/views/build/404.html': '/view/src/404.html'
        }
      }
    }
  });
  grunt.loadNpmTasks('grunt-contrib-htmlmin');
  grunt.registerTask('default', ['htmlmin']);
};
本当に特別なことは何もありません。私の 404.html も非常に単純ですが、単純なHTMLファイルでも grunt は機能しません。たとえば、次のHTMLファイルがあるとします。
<html>
    <head>
    </head>
    <body>
    </body>
</html>
それもうまくいきません。結果としてコンソールに表示されるのは次のとおりです。
Running "htmlmin:dist" (htmlmin) task
Minified 0 files (1 failed)
Done, without errors.
失敗した理由はどこで確認できますか?
削除するなど、本当に多くのことを試しました。また、構造をoptions変更しようとしましたが、最終的には次のようになりました。file
files: {
    expand: true,
    cwd: 'views/src/',
    src: '404.html',
    build: 'views/build/404.html'
}
しかし、それも機能せず、現在発生しているエラーは次のとおりです。
Running "htmlmin:dist" (htmlmin) task
Warning: pattern.indexOf is not a function Use --force to continue.
Aborted due to warnings.
私は何を間違っていますか?