What is the correct way to install jQuery UI in a Meteor application? Since it's not a package yet, I added the jquery-ui.min.js and jquery-1.8.3.js that came in the download into the lib
folder in my meteor project. That is causing the following fatal error:
Your app is crashing. Here's the latest log.
app/lib/jquery-1.8.3.js:9472
})( window );
ReferenceError: window is not defined
at app/lib/jquery-1.8.3.js:9472:5
(.........)
Exited with code: 1
Your application is crashing. Waiting for file change.
I have actually added a jquery-ui meteorite package that you can install
mrt add jquery-ui
Note this package is version 1.8.16 and is a dependency of the jquery-ui-bootstrap package which, if installed, will automatically include the jquery-ui
and bootstrap-updated
smart packages. (All of which make bootstrap and jquery-ui play nicely together).
To install everything, you can use:
mrt add jquery-ui-bootstrap
You need to put jquery UI in the client
directory otherwise it is loaded by Meteor on both client and server and crash your app.
I've created an alternative jquery-ui package for Meteor that also includes images:
https://github.com/mizzao/meteor-jqueryui
Use mrt add jqueryui
(note there's no dash) to install it. I know, this Meteor package proliferation sucks, due to things not getting maintained. But it should all get better soon when Meteor releases its official packaging system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With