2

Seem to be getting a strange error after downloading semantic-ui and I can't get it to run when I've chosen what I do, and do not want in my custom.semantic.json file. I've tried also downloading/installing the jQuery package to my directory with no joy. Error message below.

>/Users/Kyle/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/fibers/future.js:245
                        throw(ex);
                              ^

> ReferenceError: jQuery is not defined
>     at app/definitions/behaviors/api.js:1081:5
>     at app/definitions/behaviors/api.js:1083:3
>     at /Users/Kyle/Desktop/portfolio/.meteor/local/build/programs/server/boot.js:222:10
>     at Array.forEach (native)
>     at Function._.each._.forEach (/Users/Kyle/.meteor/packages/meteor-tool/.1.1.3.1wysac9++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)
>     at /Users/Kyle/Desktop/portfolio/.meteor/local/build/programs/server/boot.js:117:5
> Exited with code: 8 Your application is crashing. Waiting for file
> change.
11
  • Meteor comes with jQuery. How did you install Semantic-UI? Did you use this package? atmospherejs.com/semantic/ui Jul 20, 2015 at 5:38
  • Yep, I know it does, which is why I'm wondering why I'm getting this issue. I installed semantic-UI through command line into my Meteor directory and then created the custom.semantic.json file, as soon as it scaffolds out the app and creates the folders I start getting jQuery issues. Weird one! And yep, right from Atmosphere JS. Jul 20, 2015 at 9:08
  • Well, looking at the docs under Usage: github.com/Semantic-Org/Semantic-UI-Meteor - it seems that you want to first create an empty custom.semantic.json, and only then do you start Meteor. After Meteor has started you can then edit custom.semantic.json. Jul 20, 2015 at 9:14
  • I have done this, the file creates and then scaffolds out the rest of app, then I get that error. I have read the documentation umpteen times. Jul 20, 2015 at 10:25
  • What displays when you do meteor list? Are you doing something like accidentally loading jQuery twice, the second time maybe being from code in your HTML? I just installed the Semantic-UI package and it starts right up. Jul 20, 2015 at 10:40

1 Answer 1

11

In Meteor, this happens when custom.semantic.json is inside the root's lib/ folder. Thus, Semantic-UI generates all its folders and files in lib/ which is loaded before any of its core dependencies, such as jQuery.

The solution is to place custom.semantic.json in an app folder, such as client/lib/semantic-ui/.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.