Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Object has no method 'any' #22

Closed
Guuz opened this issue Feb 19, 2015 · 4 comments
Closed

TypeError: Object has no method 'any' #22

Guuz opened this issue Feb 19, 2015 · 4 comments

Comments

@Guuz
Copy link

Guuz commented Feb 19, 2015

The latest version breaks:

return Object.keys(ngDeps.modules).any(function (module) {
                                     ^
TypeError: Object  has no method 'any'

The build of this module is also breaking: https://travis-ci.org/klei/gulp-angular-filesort

Trying to downgrade in our project to see if it fixes this.

@jigfox
Copy link

jigfox commented Feb 19, 2015

the tests on travis ci show the same error: https://travis-ci.org/klei/gulp-angular-filesort/jobs/51355096

@Guuz
Copy link
Author

Guuz commented Feb 19, 2015

Yup! this could have broken many projects around the world... :-/
Not so sure if the npm syntax with the tilde is really great. In theory it is better but people accidentally release broken code. We had "~1.0.4" and that upgraded to "1.1.0" which is broken...

@joakimbeng
Copy link
Member

@Guuz if you've used the tilde it shouldn't upgrade to 1.1.0, see for instance http://stackoverflow.com/questions/22343224/difference-between-tilde-and-caret-in-package-json

This is a typo, and did work before because ng-dependencies had sugar as a dependency. The method should be Array.prototype.some.

A fix is on its way!

@Guuz
Copy link
Author

Guuz commented Feb 19, 2015

Thanks for the quick fix!
And I made a mistake and said tidle when I ment '^'. This is the NPM default but it's bitten me a few times now... Like this. An dependency changes and breaks but it is auto updated and hard to trace down. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants