-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: Outlayer is undefined #618
Comments
Can you check you are using masonry.pkgd.js and not just masonry.js |
/**
|
i had change use this code . it is work fine. |
Thanks desandro. I searched for this issue and immediately changed to .pkgd and it worked |
But If I use Masonry with Bower? It will add these automatically: ...
<script src="../bower_components/get-style-property/get-style-property.js"></script>
<script src="../bower_components/get-size/get-size.js"></script>
<script src="../bower_components/eventie/eventie.js"></script>
<script src="../bower_components/doc-ready/doc-ready.js"></script>
<script src="../bower_components/eventEmitter/EventEmitter.js"></script>
<script src="../bower_components/matches-selector/matches-selector.js"></script>
<script src="../bower_components/outlayer/item.js"></script>
<script src="../bower_components/outlayer/outlayer.js"></script>
<script src="../bower_components/masonry/masonry.js"></script>
... But those errors still appears:
On // browser global
window.Outlayer = factory(
window,
window.eventie,
window.EventEmitter,
window.getSize,
window.fizzyUIUtils,
window.Outlayer.Item // !! this is the LINE 42 !!
); |
I have the same issue as poliveira89 when installing with "bower install --save jquery.masonry"
in the code block
Is there a workaround? |
If you are using wiredep, then you're most likely missing "overrides": {
"outlayer": {
"main": [
"item.js",
"outlayer.js"
]
}
} |
For those who run into this issue while using roots/ sage – easiest solution is to add this to the main "overrides" section in the main bower.json file:
The entirety of the main theme bower.json file in my case then looks like this:
|
@maija-brazen You're a star |
@maija-brazen Highest of fives - thanks for the fix! |
@maija-brazen Thank you! 👍 |
@maija-brazen Thanks a lot! It did the trick for me too :) |
This combined with the answers here |
For anyway using the new version of Masonry
|
TypeError: Outlayer is undefined
var Masonry = Outlayer.create('masonry');
The text was updated successfully, but these errors were encountered: