Gruntjs GrunFile失败,警告:Task";“违约”;找不到 这是我的文件 我运行$grunt默认值

Gruntjs GrunFile失败,警告:Task";“违约”;找不到 这是我的文件 我运行$grunt默认值,gruntjs,grunt-contrib-watch,long-running-processes,Gruntjs,Grunt Contrib Watch,Long Running Processes,实际上,我想在某个端口上打开index.html,并希望它直接在chrom中打开 module.exports = function(grunt) { grunt.initConfig({ connect: { server: { options: { port: 9001, base: { path: 'Dev', options: { index: 'index.ht

实际上,我想在某个端口上打开index.html,并希望它直接在chrom中打开

  module.exports = function(grunt) {
  grunt.initConfig({
 connect: {
    server: {
      options: {
        port: 9001,
        base: {
          path: 'Dev',
          options: {
            index: 'index.html',
            maxAge: 300000
          }
        }
      }
    }
  },
   open: {
    delayed: {
      path: 'http://localhost:9001'
      app: 'Google Chrome'
      options: {
        openOn: 'serverListening'
      }
    }
  }     
  });
grunt.registerTask('default', ['connect', 'open']);
};

您需要加载任务:

grunt.loadNpmTasks('grunt-contrib-connect');

您需要加载任务:

grunt.loadNpmTasks('grunt-contrib-connect');