phadaphunk
phadaphunk

Reputation: 13313

Can't build my web application when integrating bootstrap template

I'm totally new to Node.js meteor and all development outside of visual studio.
When I go in the console and add bootstrap like this :

npm install twitter-bootstrap

It gets installed and adds all the bootstrap files in my solution but when I run my application with meteor it says

Process finished with exit code 254

No more information. No errors. If I delete all the bootstrap files, it builds and run just fine. Any idea what might be causing this?

I've tried looking for the exit code meaning but I can't find it for my IDE and I'm a bit clueless as for why simply adding those packages without even referencing them anywhere in the project might cause my application not to run at all.

Upvotes: 0

Views: 191

Answers (2)

Lonewolf
Lonewolf

Reputation: 11

You can use atmosphere meteor packages called mizzao:bootstrap-3 by running the commend

meteor add mizzoa:bootstrap-3

Alternatively if you want to use npm packages you must add meteorhacks:npm packages.

meteor add meteorhacks:npm npm install twitter-bootstrap

You can specify all the required npm packages inside a packages.json file.

{      
 "gm":"1.16.0",
 "twitter":"0.2.12",
 "twitter-bootstrap":"2.1.1",
}

Upvotes: 1

Christian Fritz
Christian Fritz

Reputation: 21364

You can't add npm packages in your project folder like that. It will create a node_modules sub-directory that meteor will treat like any other project folder, i.e., it will interpret all the files in it. That's not what you want. Either do the npm install in a super-directory, or, better yet, use the meteor meteorhacks:npm package (https://atmospherejs.com/meteorhacks/npm):

meteor add meteorhacks:npm

and then add the npm dependency to your packages.json file.

{ "twitter-bootstrap": "2.1.1" }

But the real question is: why do you need this package? bootstrap3 is already part of the standard meteor packages, i.e., you already have full access to bootstrap, incl. javascript.

Upvotes: 1

Related Questions