FunkyPeanut
FunkyPeanut

Reputation: 1182

Warning: Task "browserfy" not found

I want to use browserfy to transform es6 files to es5. But everytime the watch-task is executed I get the error:

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

I automate the task with the following gruntfile (simplified):

grunt.initConfig({
browserfy: {
  dist: {
    options: {
      transform: [
        ["babelify", {
          loose: "all"
        }]
      ]
    },
    files: {
      "dist/module.js": ["lib/main.js"]
    }
  }
},
watch: {
  lib_test: {
    files: '<%= jshint.lib_test.src %>',
    tasks: ['jshint:lib_test', 'browserfy'/*, 'qunit'*/]
  }
}});

grunt.loadNpmTasks("grunt-browserify");
grunt.loadNpmTasks('grunt-contrib-watch');

I also used the command

npm install grunt-browserify --save-dev

Upvotes: 1

Views: 674

Answers (1)

FunkyPeanut
FunkyPeanut

Reputation: 1182

Solved the problem. I had a typo. It is "browserify.

Upvotes: 1

Related Questions