Deploying on Modulus / Nodechef Cordova

So, after 1.3x I’ve had difficulty deploying to Modulus or Nodechef specifically because of the mobile build.

I’ve tested locally and when I make changes to my code and only build for server it removes the hot code pushing and generates a webapp.js error in the console for the android device. The android device still connects and works with the version that I initially built with the mobile run android-device.

Any suggestions on how to deploy to either Modulus or NodeChef when you are targeting mobile devices after 1.3 and with the current Modulus CLI?

With the old modulus CLI 5.0.1 and Metor 1.3 I was able to do it but it takes over 40min to deploy and several tries, their compression takes forever or it would fail to upload.

Just throwing theses two things out there.

  1. I have had issues deploying to modulus via their CLI on windows that I do not have on my mac.

  2. They just launched their new Meteor container type vs the “JS” type. Maybe switch into that.


Actually the node environment is what works for me. Their meteor environment doesn’t work at all when you have mobile platforms. It fails during the mobile build

@flean: When you say you only build for server, do you mean passing --server-only to meteor build? Make sure you don’t remove the mobile platforms before you build. (If you remove the mobile platforms before building instead, hot code push for Cordova will be disabled because the Cordova bundle included in the server bundle will not be generated.)

No, the problem is that Modulus and NodeChef don’t know how to handle the mobile platforms. They now require us to meteor build but when you do that with a mobile platform it asks for --server and creates the folder for android. Does the tarball contain the necessary info for mobile platforms to work or does it also need the android folder with the tarball?

That is exactly we we added --server-only in Meteor 1.3: it won’t create and build the iOS or Android platforms, but it will still generate the Cordova-specific code in the server bundle (as long as you don’t remove the mobile platforms). You do need to specify --server, because without it hot code push for Cordova won’t be able to work.

Ok, I’m trying with that but I’m getting a

Compressing project…
16.2 MB written
Uploading project…
Upload progress [===================] 100%
Deploying project into Meteor runtime…
Starting build.
Creating directories for build environment.
Downloading source.
Executing build.
Demeteorizing application…
mop, this is your first time using Meteor!
Installing a Meteor distribution in your home directory.
######################################################################## 100.0%
build: You’re not in a Meteor project directory.

To create a new Meteor project:
meteor create
For example:
meteor create myapp

For more help, see ‘meteor --help’.
Conversion failed.

Thats the log from Modulus

Have you checked with Modulus? They’ve just released a new meteor deploy/environment, maybe thats what you need?

Actually that’s what has caused all the issues. LOL

They had my try this a week ago and it’s been hell.

I think they need to change their build script to include --server-only it tries to build the cordova app but since its missing the Failed to find ‘ANDROID_HOME’ which i think is related to the --server param.

Yes, they would have to include --server-only. Without it, if a project has mobile platforms added, it will try to build the mobile apps and fail if the SDKs have not been installed. --server is still needed for a project with mobile platforms, even when only building the server bundle.

@flean Just want ping and say… I had issues deploying to the new Meteor type and their twitter suggested I upgrade the CLI tool using: npm install -g modulus@next

Worked perfectly after that!

@ssparacio Are you on 1.3 and targeting mobile? How did you provision modulus(node / meteor)?

On 1.3 but not targeting mobile. I used their web interface to create the new project. I selected the 192MB Servo and the Meteor ‘language’. The upgraded CLI tool is what really did the trick.

Yea, its the mobile targeting that’s causing me issues. It hangs the build.

Well, that error you are getting build: You're not in a Meteor project directory. was the same one I was getting till I upgraded the CLI to @next. Could be worth a shot if you have not tired it. :slight_smile:

Update: Modulus has updated their docker-build-meteor to include the--server-only . So if you are deploying a meteor app with mobile make sure to select Meteor environment and it should work.