Dany Y
Dany Y

Reputation: 7041

Meteor only working when deployed in debug mode

Hi I have a meteor application that's working fine when running locally. But when i deploy it to a meteor website or bundle to deploy it on another server it doesn't work.

Strangely if I deploy in debug mode, meteor deploy --debug example.meteor.com it works.

I'm using meteor and meteorite, and some jquery plugins that i include as files

Any clue of what might be the problem ?

Thanks

Upvotes: 3

Views: 1444

Answers (2)

maudulus
maudulus

Reputation: 11045

"Solved by adding jquery as a meteor AND npm package..."

I was also getting the error message jQuery not found. Based on @Akshat's answer and this Github post, I ran the following and got it working:

meteor add jquery
meteor npm i jquery --save

Upvotes: 0

Tarang
Tarang

Reputation: 75965

Check your javascript console for errors.

You likely have a syntax error somewhere or you're trying to access a variable that is undefined. When the files are concatenated and minified the syntax error stops the rest of the script running.

In debug mode the files are separated so it won't stop the other files code from running. This is probably why it works in debug mode but not in production mode.

Another quick test is to see if meteor --production doesn't work.

Upvotes: 6

Related Questions