phadaphunk
phadaphunk

Reputation: 13313

Installing bootstrap 3 with meteor

I've read a lot of posts about how bootstrap can be included in your meteor project and more recently, I've seen people using

meteor add mizzao:bootstrap-3

like in this anwser.

The thing is when I try to do it I get the following error :

mizzao:bootstrap-3: no such package

Is there another version I need to use or is there another way to add bootstrap 3 to a meteor project.

Upvotes: 1

Views: 6337

Answers (6)

Andrew Mao
Andrew Mao

Reputation: 36940

I actually set up mizzao:bootstrap-3 a long time ago, but this was for a much older version of Meteor.

Starting from Meteor 1.3 which offers first-class npm support, the recommended approach is to install Bootstrap directly from npm, which doesn't depend on any poorly-maintained (ahem) shim packages:

$ meteor npm install --save bootstrap

(This also saves bootstrap in your package.json file so others can install it with meteor npm install.)

Then, in any client-side JS file (e.g. /client/main.js):

import 'bootstrap';
import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap/dist/css/bootstrap-theme.css';

If you're interested in more customized Bootstrap installs using SASS/SCSS, etc. check out this post.

Upvotes: 0

ismapro
ismapro

Reputation: 162

You can install the lastest version, simply use this in the project folder:

meteor add twbs:bootstrap

if you don't find it, it worth trying to update your repository:

meteor search .

Upvotes: 2

alesch
alesch

Reputation: 842

There is now an official package here: https://atmospherejs.com/twbs/bootstrap

Upvotes: 0

Jackal
Jackal

Reputation: 2692

Installation With Meteor 0.9 and above, install using:

meteor add mizzao:bootstrap-3

Upvotes: 0

Mustafa
Mustafa

Reputation: 1776

If you are on windows, it wont work.

Upvotes: 0

Rajanand02
Rajanand02

Reputation: 1303

For meteor 0.9 or above

meteor add mizzao:bootstrap-3

For meteor < 0.9 use meteorite to add packages.

npm install -g meteorite
mrt add bootstrap-3

To search for available meteor packages use

meteor search package-name

NOTE: search command will work only for Meteor 0.9 or above

Upvotes: 10

Related Questions