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

Wiredep TypeError: Cannot read property Item of undefined when using masonry with bower #727

Closed
pgrm opened this issue Jul 22, 2015 · 3 comments

Comments

@pgrm
Copy link

pgrm commented Jul 22, 2015

I've a setup, where my bower dependencies get included automatically via wiredep and I merge them afterwards with useref.

This works fine for all dependencies, but masonry. I've tried moving masonry to the beginning as well as the end of those dependencies, but I'm always getting the same error. When I take out masonry and add an extra reference to your cdn link, it works. (Also all the other scripts work).

I've seen this issue: #618 and discovered that masonry's bower file is linking the wrong main file (#725) but even if I overwrote the main file to the correct one, I was still getting the same error. The cdn-file and bower files are identical, so probably the problem is somewhere in how wiredep is merging the files together?

Before that, I was already using masonry bundled together with ASP.Net and that worked fine. Any ideas what could be wrong here?

@desandro
Copy link
Owner

Have you tried using the override?

  "overrides": {
    "outlayer": {
      "main": [
        "item.js",
        "outlayer.js"
      ]
    }
  }

@desandro desandro changed the title TypeError: Cannot read property Item of undefined when using masonry with bower Wiredep TypeError: Cannot read property Item of undefined when using masonry with bower Jul 22, 2015
@pgrm
Copy link
Author

pgrm commented Jul 22, 2015

Yes, this worked!
Thx

@pgrm pgrm closed this as completed Jul 22, 2015
@brayan15
Copy link

brayan15 commented May 4, 2017

ty, it's working

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