Galaxy deploy not minified [SOLVED]

I finally signed up for Galaxy and deployed my first app. Everything went great. However, today I noticed that the app is not minified. Looking at meteor deploy --help it says that specifying --debug would not minify. Needless to say I did not deploy with --debug.

How can I make sure/enforce that the meteor command deploys minified?

Just re-installed meteor from scratch, no change. My app on galaxy still is not minified.

I just opened and issue on github for this

hm, can you try setting NODE_ENV to production, using the settings.json file and see if it helps.

I did :frowning: in settings.[“galaxy.meteor.com”].env as well as in the settings.env

Do you happen to have an application deployed on Galaxy? Can you check if your code is minified?

No not now I don’t. I used to manage a few deployments over there and never had such a problem, though.

Most terrible. I was afraid to be the only one with this problem, which really sucks. Also explains why I haven’t heard back on the support ticket I opened with Galaxy.

I think Galaxy does not have an SLA in terms of ticket response times unless you pay extra for support. So it is pretty normal if you don’t hear back from them in a few days, if at all. But again, although “we don’t have an SLA” is their official answer, they are also sometimes surprisingly attentive as well :slight_smile:

Yeah, I know. There is another thread about the SLA. I think the plan I am on says 24 hours. I am not really complaining, I would just like to know what is going on and why this is happening. Was hoping that more people would respond to THIS thread confirming that it’s just me who has that problem … or something.

It may be a far stretch, but did you try stripping away packages that are related to development? Or those that involve build plugins?

That is probably a good approach. The only reason I haven’t done that is because meteor build works as advertised (I used to host the app myself before migrating it to Galaxy).

Yeah, and that’s why I said it may be a far stretch. It is a possibility, though!

I just looked up minification on the meteor guide, and it mentions the standard-minifiers package, which was not part of my project. So I added it, but now the deploy process errors out with

Unexpected token punc «(», expected punc «:»

without a meaningful way to track down WHERE that happens in my code

OK, this doesn’t seem to be a meteor deploy issue after all. A while ago, when I first started to meteor build my project, it would barf the

Unexpected token punc «(», expected punc «:»

error and I was not able to track down where and why, so I must have removed the standard-minifiers package.

Sorry for the white noise. Hope someone can maybe enlighten me how to track down that error, maybe by enabling some debugging so I at least see WHICH file trips up the minifier.

are you using a third party build plugin?

for css/scss/less/jade etc?

No, unless one of my atmospherejs modules is …

I made a typo in one of my files that tripped up uglifyjs, which gets called from within standard-minifiers.

Since the stack trace from build or deploy is useless to track down the offending file, I had to resort to

find lib client -type f -name \*.js|while read file;do uglifyjs -o /dev/null $file;done

which showed me file causing the build to croak

PS: alias uglifyjs=~/.meteor/packages/standard-minifier-js/.1.0.6.c7p8uw++os+web.browser+web.cordova/plugin.minifyStdJS.os/npm/node_modules/meteor/minifier-js/node_modules/uglify-js/bin/uglifyjs

3 Likes

I am getting the following error after running the above function:

Parse error at client/main.js:1,7

Here’s main.js:

import '/imports/startup/client';

Any news on this? Really need help! :frowning: