Search code examples
powershellgruntjsgrunt-contrib-concat

GruntJS Concat don't work (Maximum call stack size exceeded)


Has anyone faced this error with Concat (Loop Infinite)? http://pastebin.com/XQsYuqdc

GruntJs on windows Terminal: PowerShell


Solution

  • You are defining a task which will run itself, entering an infinite loop.

    This is the problem line:

    grunt.registerTask( 'concat', [ 'concat' ] );
    

    This will also be a problem:

    grunt.registerTask( 'copy', [ 'copy' ] );
    

    In both of those cases, there's no reason to define custom tasks to run the grunt tasks (I suggest removing those two lines, and then things will work).

    You could define a custom task to run both of those tasks though, something like:

    grunt.registerTask( 'build', [ 'concat', 'copy' ] );