It’s because Ember CLI enforces CSP on the local node server. You have to whitelist external domains you want to pull from- check out that link for the API. I’m sure @rwjblue can clarify better than I can.
Yes, I tried that first and this is what happened:
c:\Sites\MyEmberApp>npm install --save-dev ember-cli-bootstrap
|
> ember-cli-bootstrap@0.0.12 postinstall c:\Sites\MyEmberApp\node_modules\ember-cli-bootstrap
> bower install
bower cached git://github.com/twbs/bootstrap.git#3.1.1
bower validate 3.1.1 against git://github.com/twbs/bootstrap.git#~3.1.1
bower cached git://github.com/ember-addons/bootstrap-for-ember.git#0.7.0
bower validate 0.7.0 against git://github.com/ember-addons/bootstrap-for-ember.git#~0.7.0
bower cached git://github.com/jquery/jquery.git#2.1.1
bower validate 2.1.1 against git://github.com/jquery/jquery.git#>= 1.9.0
bower install ember-addons.bs_for_ember#0.7.0
bower install bootstrap#3.1.1
bower install jquery#2.1.1
ember-addons.bs_for_ember#0.7.0 vendor\ember-addons.bs_for_ember
bootstrap#3.1.1 vendor\bootstrap
└── jquery#2.1.1
jquery#2.1.1 vendor\jquery
ember-cli-bootstrap@0.0.12 node_modules\ember-cli-bootstrap
c:\Sites\MyEmberApp>ember server
version: 0.1.2
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\bootstrap\dist\css\bootstrap.css` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\bootstrap\dist\css\bootstrap.css.map` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\css\bs-growl-notifications.min.css` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-core.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-alert.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-alert.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-badge.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-badge.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-basic.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-basic.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-breadcrumbs.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-breadcrumbs.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-button.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-button.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-core.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-core.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-growl-notifications.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-growl-notifications.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-items-action-bar.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-items-action-bar.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-label.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-label.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-list-group.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-list-group.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-modal.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-modal.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-nav.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-nav.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-notifications.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-notifications.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-popover.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-popover.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-progressbar.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-progressbar.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-wizard.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\ember-addons.bs_for_ember\dist\js\bs-wizard.max.js` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\bootstrap\dist\fonts\glyphicons-halflings-regular.eot` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\bootstrap\dist\fonts\glyphicons-halflings-regular.svg` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\bootstrap\dist\fonts\glyphicons-halflings-regular.ttf` into a subdirectory.
Using `app.import` with a file in the root of `vendor/` causes a significant performance penalty. Please move `vendor\bootstrap\dist\fonts\glyphicons-halflings-regular.woff` into a subdirectory.
Livereload server on port 35729
Serving on http://0.0.0.0:4200/
Build successful - 30973ms.
Slowest Trees | Total
-------------------------------+----------------
TreeMerger (appAndDependencies) | 6410ms
TreeMerger (ExternalTree) | 4799ms
TreeMerger (stylesAndVendor) | 4463ms
TreeMerger (vendor) | 2786ms
CustomStaticCompiler | 2729ms
TreeMerger | 2729ms
TreeMerger | 1785ms
The strange thing is that my vendor directory is empty except for a file named .gitkeep.
I agree with @Panman8201 that clearing your caches might help, as this has fixed issues for me as well when I’ve tried a few different paths to get something working. I’d also clear the bower cache
Also, to get the Bootstrap javascript working you need to explicitly import the javascript in your Brocfile.js
I also ran into an issue related to Bootstrap where I had to include the un-minified version of handlebars.js to get builds working on Heroku and Firebase. You may not need that and better if you don’t as your deployed code will be smaller).
var app = new EmberApp({
'ember-cli-bootstrap': {
'importBootstrapJS': true
},
vendorFiles: {
'handlebars.js': {
production: 'bower_components/handlebars/handlebars.js'
}
},
});
@pcjpcj2 I followed your example, but I think i might have done something wrong, since it’s not picking up bootstrap. when you do the bower install do you have to be in a specific directory of your app? or root does it? I imported the files also, no luck.
To use bower you must be in the ember directory, as it will download the modules to bower_components in your ember app directory. Also, bower.json keeps track of the dependencies of your particular project.
@jorge_lainfiesta I thought that was the case, though there’s something fishy then.
… omitted for brevity
"bootstrap": "~3.3", "ember-addons.bs_for_ember": "~0.7.0" }, "devDependencies": { "bootstrap": "~3.3.4" } } these are the dependencies in my bower.json and i see the directory it created for me in my bower_components. So why aren’t the changes being applied to my code?
@jorge_lainfiesta Yea I’m pretty sure i had to restart my server. Because now i have a few bugs, `Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.Uncaught Error: Could not find module `ember-cli-bootstrap/utils/test-breadcrumbs` imported from `blogger/helpers/test-breadcrumbs`