How to installl MDB in a Meteor 1.2.x setup


Topic: How to installl MDB in a Meteor 1.2.x setup

robert@dunderon.se asked 8 years ago

Hi, after struggling with FezVrasat:bootstrap-material-design a couple of days I'm ready to try MDB instead. Is there any best practices how to install MDB in a Meteor 1.2.x project? My project will be upgraded to Meteor 1.3.x later when all packages I'm using have been tested according to the new 1.3 standards.

Michal Szymanski staff pro premium priority answered 8 years ago

Hi Robert, I've already answered you via email. Check pleas you mailbox.
Please answer the above question here, its nice to know as I am also using Meteor to develop my app and would very much like to try it with MDB.

Michal Szymanski staff pro premium priority answered 8 years ago

In the last few months Meteor had a few big updates. We didn't have a time to check it yet, so I cannot advice you in this question right now.

kurapikats answered 8 years ago

Hi, I bought MDB Pro last Sept 27, 2016. How do I use MDB Pro in Meteor? Thanks!
I want to learn how to use with Meteor 1.4. I installed it using npm, but then what I need to import in the place I want to build my component (with React)? I couldn't find any examples or documentation. And I think support is not very proactive, unfortunately, but I hope they will prove me wrong.

aajaji_m pro answered 8 years ago

Hi Gilbert, I'm also intereset in a NPM package because i'm learning Meteor (1.4.x now). But, in the meantime I found solution for this. -> 1: Unzip the pro version .zip file -> 2: Copy/paste the content into [yourAppFolder]/node_modules/material-design-bootstrap -> 3: Create a package.json file and add it to the previous folder, with following content (simple but works): { "name": "materiel-design-bootstrap", "version": "4.2.0", "description": "Material Design for Bootstrap", "main": "js/mdb.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "MDB", "license": "ISC" } -> 4: In your "client" folder, add the folowing line to the "main.scss" file: @import "{}/node_modules/materiel-design-bootstrap/sass/mdb.scss"; -> 5: Enjoy :)

Bartłomiej Malanowski staff pro premium answered 8 years ago

@aajaji_m I'm glad you found a solution :)

zoran.spoja pro answered 8 years ago

Hello This solution doesn't work for me. For unknown reason i have to put this in .scss file: @import "../../node_modules/material-design-bootstrap/sass/mdb.scss"; After that I have scss rendered, but js doesn't work. I feel that something is missing but I don't know what. Can you help me?

Bartłomiej Malanowski staff pro premium answered 8 years ago

Do you get any console logs?

james.scaggs pro answered 8 years ago

Are there any further updates on this? I am trying to use with Meteor 1.4.x and am getting jQuery not defined in mdb.min.js console error. I installed via npm and have also tried using CDN links, both are giving same error. The CSS is working fine but the JS isn't. I know that Meteor already uses jQuery but I think the issue is that it's trying to load mdb.min.js before jquery.
<head>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.3.0/css/mdb.min.css" />
	<!-- SCRIPTS -->
  <!-- JQuery -->
  <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <!-- Bootstrap tooltips -->
  <script type="text/javascript" src="../node_modules/mdbootstrap/js/tether.min.js"></script>
  <!-- Bootstrap core JavaScript -->
  <script type="text/javascript" src="../node_modules/mdbootstrap/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.3.0/js/mdb.min.js"></script>
	<title>Meteor App MDB</title>
</head>
<body>
	<div id="render-target"></div>
</body>
Console error screenshot - https://screencast.com/t/MeaJr3nxWmo

james.scaggs pro answered 8 years ago

One quick update, I've since commented out CDN links to bootstrap and tether and moved the mdb.min.js script to the footer and now the MDB JS is working. I'm still getting the jQuery is not defined console error in mdb.min.js though. Anyone know how to fix that?
Hello, Unfortunately, we aren't currently supporting meteor. Regards

eytanronen pro commented 7 years ago

Hello, I just purchased the pro package and am not able to install on Meteor, any update on this since this last post?

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No