thom4parisot / grunt-crx

Grunt task used to package private Chrome Extensions.
https://npmjs.com/grunt-crx
MIT License
118 stars 21 forks source link

Object function lodash ... has no method 'assign' #15

Closed jardilio closed 11 years ago

jardilio commented 11 years ago

New error introduced in version 0.2.1 that didn't exist in 0.2.0. Related to line 60 in crx.js:

// Eventually expanding ~ in config paths grunt.util._.assign(config, config, resolveHomeDirectory);

Warning: Object function lodash(value) { // exit early if already wrapped if (value && value.wrapped) { return value; } // allow invoking lodash without the new operator if (!(this instanceof lodash)) { return new lodash(value); } this.wrapped = value; } has no method 'assign' Use --force to continue

thom4parisot commented 11 years ago

OK, this method is available since lodash 1.0.0 and grunt only ships 0.9. I did a test outside the extension – which leads me to refactor some stuff to make this part more easily testable (too much untested logic for now and I don't like that).

Basically you can revert to 0.2.0 until I fix the problem because it was almost the sole change in this release.

jardilio commented 11 years ago

Correct, thats what I did, I also found someone else with the same issue logged on SO: http://stackoverflow.com/questions/16198876/error-using-grunt-crx-task/16280268#16280268

thom4parisot commented 11 years ago

Could you please retry by using 0.2.2-beta?

It should work but as I did some refactoring to ease up testing, I'd prefer to be sure your usage is fine.

Thanks :-)

jardilio commented 11 years ago

Tested 0.2.2 with no errors on node 0.10.5 and grunt 0.4.1, thanks.

thom4parisot commented 11 years ago

Cool! Sorry for the issue :-)