1

I've looked around but can't find the proper way to include bootstrap with ember. I don't want the ember-bootstrap package since it doesn't support bootstrap 4.

I'm also lost about every article outhere telling to use bower to install it but since bower is being remplaced with yarn I don't want to use a deprecated method.

I've try many times but it always fail when I'm trying to import the bootstrap.js file in my ember-cli-build.js like so --> app.import('bower_components/bootstrap-sass-official/assets/javascripts/bootstrap.js'); I'm having this error

The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (vendor & appJS)] 
failed with:
Error: ENOENT: no such file or directory, open '/private/tmp/my-first-
ember-app/tmp/source_map_concat-input_base_path-
S9AGEQc7.tmp/bower_components/bootstrap-sass-
official/assets/javascripts/bootstrap.js'

Many thanks !

2 Answers 2

2

You can do npm install [email protected] for bootstrap and import the required files through ember-cli-build.js file from node_modules folder.

For importing node_modules file, you should have ember-cli version 2.15 onwards.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks it went just well after upgrading ember !
1

You have a wrong assumption in your question. ember-bootstrap does support Bootstrap 4 since version 1.0.0-alpha.5 which was released on February 27th 2017. There is a section in setup guide about how to switch to Bootstrap 4.

In short it's:

  • ember install ember-bootstrap
  • ember generate ember-bootstrap --bootstrap-version=4

ember-bootstrap 1.0.0 is not released yet. Current version is 1.0.0-rc.4. Also Bootstrap 4 support is only experimental. But that's mainly caused by Bootstrap 4 not having a stable release yet.

If you don't like or don't need the component of ember-bootstrap you are better of with just importing bootstrap assets as described by kumkanillam.

1 Comment

My mistake i've just RTFM lol and as you said it does support bootstrap 4 ! Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.