I’m using Bootstrap 3 which I imported through the twbs:bootstrap package. It’s a simple program that is just displaying a countdown timer on the webpage (for the launch of my app).
However, I get the following error messages preventing me from starting Meteor:
at Array.forEach (native)
at Function._.each._.forEach (/Users/andreaswest/.meteor/packages/meteor-tool/.18.104.22.168pfp1d++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
jquery is already in the list of loaded packages with version 1.2
meteor-base # Packages every Meteor app needs to have
mobile-experience # Packages for a great mobile UX
mongo # The database Meteor supports right now
blaze-html-templates # Compile .html files into Meteor Blaze views
session # Client-side reactive dictionary for your app
jquery # Helpful client-side library
tracker # Meteor’s client-side reactive programming library
standard-minifiers # JS/CSS minifiers run for production mode
es5-shim # ECMAScript 5 compatibility for older browsers.
ecmascript # Enable ECMAScript2015+ syntax in app code
Since you’ve already added the bootstrap package, you don’t need to include it anywhere else (or refer to it in your index.html). Meteor will take care of this for you. So to get this working:
Add the jquery package back in: meteor add jquery
Remove bootstrap everywhere you have it (all locations - so completely remove the bootstrap directory in your project root, remove it from the js directory in your project root, and remove it from your client/lib directory).
Remove jquery everywhere you have it (all locations - so remove it from your client/lib directory and your js directory).
Remove the references to Bootstrap and jQuery in your index.html - so completely remove:
You should also re-read the Structuring your application section of the Meteor docs, paying close attention to what happens to files in directories outside of Meteor’s special directories (which was a large part of the problem in your case since Meteor was attempting to load your Bootstrap JS files on both the client and server).
ReferenceError: require is not defined
Will try and see what happens if I delete more files, starting with npm.js
So the problem is Bootstrap installing it’s code in all those locations that Meteor is anal about it? That’s exactly why I was having a discussion on FB yesterday about why it’s so difficult for other UI’s like eg Polymer to work together with Meteor.
Guess it all has to do with who’s the prophet and who’s the mountain