thanpolas / grunt-closure-tools

Google Closure Tools for grunt
MIT License
95 stars 22 forks source link

Warning: Cannot call method 'indexOf' of undefined Use --force to continue. #35

Closed randomailer closed 7 years ago

randomailer commented 11 years ago

module.exports = function (grunt) { grunt.initConfig({

    closureBuilder: {
        options: {
            closureLibraryPath: 'web-app/s/js_src/outer',
            builder: 'web-app/s/js_src/outer/closure/bin/build/closurebuilder.py',

            root: ['web-app/s/js_src/outer','web-app/s/js_src/inner'],

            compilerFile: 'web-app/s/js_src/outer/closure/bin/compiler.jar',
            output_mode: 'compiled',
            compile: true,

            inputs: [
                'web-app/s/js_src/inner/'
            ],

            namespaces: ['ic.App'],

            compilerOpts: {
                warning_level: 'verbose',
                compilation_level: 'ADVANCED_OPTIMIZATIONS'
            }
        },

        application: {
            dest: 'web-app/s/js/application.js'
        },
    }
});

grunt.loadNpmTasks('grunt-closure-tools');
grunt.registerTask('compile', 'closureBuilder:application');

}

{ "name": "IntellicamsFrontEndBuild", }

thanpolas commented 11 years ago

Please include an output of grunt using the --stack option

randomailer commented 11 years ago

TypeError: Cannot call method 'indexOf' of undefined at /Users/Valentine/projects/web/node_modules/grunt/lib/grunt/file.js:55:29 at Array.forEach (native) at processPatterns (/Users/Valentine/projects/web/node_modules/grunt/lib/grunt/file.js:53:34) at Object.file.expand (/Users/Valentine/projects/web/node_modules/grunt/lib/grunt/file.js:110:17) at Object.builder.validateFileObj (/Users/Valentine/projects/web/node_modules/grunt-closure-tools/lib/libBuilder.js:67:28) at /Users/Valentine/projects/web/node_modules/grunt-closure-tools/tasks/closureBuilder.js:40:22 at Array.forEach (native) at Object.closureBuilder (/Users/Valentine/projects/web/node_modules/grunt-closure-tools/tasks/closureBuilder.js:37:16) at Object. (/Users/Valentine/projects/web/node_modules/grunt/lib/grunt/task.js:258:15) at Object.thisTask.fn (/Users/Valentine/projects/web/node_modules/grunt/lib/grunt/task.js:78:16)

thanpolas commented 11 years ago

Ok, you are missing the 'src' property, i'll have to patch against that.

Add a 'src' option and you'll b ok

randomailer commented 11 years ago

src to the options?

thanpolas commented 11 years ago

No, after 'dist', see the docs

randomailer commented 11 years ago

ohh thanks, its work)

thanpolas commented 11 years ago

Need to fix the exception, reopening the issue...

thanpolas commented 7 years ago

closing due to inactivity, feel free to re-open if the issue persists.