splunk
splunk

Reputation: 6779

Can't make bootstrap work in Ember-cli

I'm trying to import bootstrap into my ember-cli project, i followed the steps into the Usage section of this page

When I run the server I get these 2 errors:

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 `frontend/helpers/test-breadcrumbs`

I'm working with these versions:

ember: 0.2.7, node: 0.12.3, npm: 2.11.0

Upvotes: 2

Views: 1162

Answers (3)

Doon
Doon

Reputation: 3749

Instructions for Ember 2.0+:

1. Install Bootstrap

Using Bower, simply run bower install bootstrap --save

2. Import Bootstrap in your Ember Application

Edit ember-cli-build.js and add:

app.import(app.bowerDirectory + '/bootstrap/dist/js/bootstrap.js');
app.import(app.bowerDirectory + '/bootstrap/dist/css/bootstrap.css');

3. Import Bootstrap in your HTML

If you created your project using ember-cli, it's not necessary. The bootstrap.js will be added to the app.js and the bootstrap.js will be added to the `vendor.css, both linked by default.

Upvotes: 2

Gaurav
Gaurav

Reputation: 12796

I've been using ember-bootstrap http://kaliber5.github.io/ember-bootstrap/ with no issues. The older ember-cli-bootstrap project is clearly deprecated.

Upvotes: 2

blazed
blazed

Reputation: 98

You can always install bootstrap via bower

bower install bootstrap --save

then in your Brocfile.js add

app.import('bower_components/bootstrap/dist/css/bootstrap.css');

http://www.ember-cli.com/user-guide/#stylesheets

Upvotes: 3

Related Questions