gleero / grunt-favicons

Generate favicon.ico and icons for iOS, Android and WP8
MIT License
232 stars 48 forks source link

RangeError: Maximum call stack size exceeded #36

Closed marcolino closed 9 years ago

marcolino commented 10 years ago

When running grunt favicons I get a bunch of these warnings:

(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.

And, most important, this fatal error:

util.js:35
  var str = String(f).replace(formatRegExp, function(x) {
                      ^
RangeError: Maximum call stack size exceeded

This is the relevant part of my Gruntfile.js:

...

favicons: {
  options: {
  },
  icons: {
    src: 'logo.png',
    dest: 'dist/images/icons'
  }
}

...

grunt.loadNpmTasks('grunt-favicons');

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

I'm using:

This is the image "logo.png": https://www.dropbox.com/s/69tuf34mrvlz9yo/logo.png

What am I missing?

gclapperton commented 10 years ago

Just got the same error. This is my first foray into Grunt, but I believe that

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

is creating a recursive relationship. Try changing the 'taskName' of registerTask like so:

grunt.registerTask('create-favicons', [
  'favicons',
]);
marcolino commented 10 years ago

Great! Thanks! My fault... I feel quite dumb when I don't see such obvious mistakes myself... :-( It' working like a charm, now... :-)

@gleero: please close this issue...

kossmann commented 9 years ago

@gclapperton I've had the same problem, thanks!!!

@gleero I think it would be nice to update the documentation to avoid this problem, what do you think?

ckollars commented 9 years ago

Ran into the same issue and this was a great help. Thanks!