How to use masonry 3.0 with require and bower-Collection of common programming errors
I install masonry 3.0 in my project, but got some error:
GET http://localhost:3000/get-style-property/get-style-property.js 404 (Not Found) require.js:1880
Uncaught Error: Script error for: get-style-property/get-style-property
http://requirejs.org/docs/errors.html#scripterror require.js:163
GET http://localhost:3000/get-size.js 404 (Not Found) require.js:1880
Uncaught Error: Script error for: get-size
http://requirejs.org/docs/errors.html#scripterror require.js:163
GET http://localhost:3000/.js 404 (Not Found) require.js:1880
Uncaught Error: Script error for:
http://requirejs.org/docs/errors.html#scripterror require.js:163
working on:
mac 10
bower 0.10
node 0.10.8
my bower.json:
{
"name": "kethervideo",
"version": "0.0.1",
"dependencies": {
"jquery": "~2.0.3",
"requirejs": "~2.1.5",
"underscore": "~1.4.4",
"masonry": "~3.0.3",
"imagesloaded": "~3.0.1"
}
}
my requirejs config:
requirejs.config({
paths: {
jquery: 'bower_components/jquery/jquery'
, underscore: 'bower_components/underscore/underscore'
, eventEmitter: 'bower_components/eventEmitter/EventEmitter'
, eventie: 'bower_components/eventie/eventie'
, getSize: 'bower_components/get-size/get-size'
, getStyleProperty: 'bower_components/get-style-property/get-style-property'
, outlayerItem: 'bower_components/outlayerAmd/item'
, outlayer: 'bower_components/outlayerAmd/outlayer'
, masonry: 'bower_components/masonry/masonry'
, imagesloaded: 'bower_components/imagesloaded/imagesloaded'
}
, shim:{
"underscore": ["jquery"]
, "masonry": ["jquery"]
, "imagesloaded": ["jquery"]
}
});
I don’t know what’s wrong with it , I include all packages what masonry need.