When adding "bower": ['backbone'] to a js dependency, I'm getting the following error in my browser console as soon as the libs.js is loaded: "Uncaught TypeError: Cannot read property 'extend' of undefined" where _ is what is undefined.
However, I can properly use _ from the browser console, so underscore.js is indeed loaded.
Here's my manifest.json:
{
"dependencies": {
"main.js": {
"files": [
"scripts/includes/**/*.js",
"scripts/main.js"
],
"main": true
},
"jquery.js": {
"bower": ["jquery"]
},
"libs.js": {
"bower": [
"modernizr",
"foundation",
"backbone"
]
},
"main.css": {
"files": [
"styles/main.scss"
]
},
"editor-style.css": {
"files": [
"styles/editor-style.scss"
]
}
},
"config": {
"devUrl": "https://dev.example.com"
},
"paths": {
"source": "assets/",
"dist": "dist/",
"bower" : "bower_components/"
}
}
Any idea why _ would be undefined when simply including/injecting the backbone bower dependency?
Thanks!
gkn
---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27069834-adding-backbone-to-dependencies-causes-underscore-error?utm_campaign=plugin&utm_content=tracker%2F8853550&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8853550&utm_medium=issues&utm_source=github).
When adding
"bower": ['backbone']to a js dependency, I'm getting the following error in my browser console as soon as the libs.js is loaded: "Uncaught TypeError: Cannot read property 'extend' of undefined" where_is what is undefined.However, I can properly use
_from the browser console, so underscore.js is indeed loaded.Here's my manifest.json:
{ "dependencies": { "main.js": { "files": [ "scripts/includes/**/*.js", "scripts/main.js" ], "main": true }, "jquery.js": { "bower": ["jquery"] }, "libs.js": { "bower": [ "modernizr", "foundation", "backbone" ] }, "main.css": { "files": [ "styles/main.scss" ] }, "editor-style.css": { "files": [ "styles/editor-style.scss" ] } }, "config": { "devUrl": "https://dev.example.com" }, "paths": { "source": "assets/", "dist": "dist/", "bower" : "bower_components/" } }Any idea why
_would be undefined when simply including/injecting the backbone bower dependency?Thanks!
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27069834-adding-backbone-to-dependencies-causes-underscore-error?utm_campaign=plugin&utm_content=tracker%2F8853550&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8853550&utm_medium=issues&utm_source=github).gkn