1

First let me state that my experience with Cordova and iOS is very limited. I have so far successfully deployed my Cordova project to the Android platform. Now I wish to deploy to iOS.

I have a MacBook Pro. It's upgraded to El Capitan. I installed XCode v. 7.2 and linked my developer account to it. I used Brew to install Node. Using npm I ran the following command:

sudo npm install -g vs-mda-remote --user=<myuser>

At this stage I expected things to work. I read a blog entry by Rick Strahl, where it seems like I do not have to install anything else.

http://weblog.west-wind.com/posts/2015/Jan/06/Using-Cordova-and-Visual-Studio-to-build-iOS-Mobile-Apps#SettingupforiOSDeployment

But when I start the vs-mda-remote

vs-mda-remote --secure false

and initiate the build from Visual Studio it fails with an error:

Cannot find module '/Users/<myuser>/remote-builds/node_modules/cordova/4.3.1/node_modules/cordova'

The connection between the Macbook and Visual Studio is established, but after something like 9 retries it fails, with the above error. I checked the folder and there is nothing named cordova in the node_modules folder.

So am I missing some pre-requisites for this build to complete or what could be the issue here?

Thanks in advance.

(Below a snippit of the build output in Visual Studio)

------ 15:48:10 Checking on build status from http://xxxxxxx:3000/build/tasks/6426 [Attempt 9] (TaskId:21)
error - Build failed with error Build process unexpectedly exited (TaskId:21) 
------ Remote build log follows (TaskId:21) 
4.3.1 (TaskId:21) Installing Cordova tools {0} for project from NPM. This could take a few minutes... cordova@4.3.1 (TaskId:21) 
npm install of cordova@4.3.1from npm completed. (TaskId:21) 
module.js:328 (TaskId:21)
    throw err; (TaskId:21) 
    ^ (TaskId:21)
(TaskId:21) 
MDAVSCLI : error : Cannot find module '/Users/<user>/remote-builds/node_modules/cordova/4.3.1/node_modules/cordova'
Mr. Blonde
  • 711
  • 2
  • 12
  • 27

1 Answers1

1

So I finally figured it out.

When I enabled Cordova in Visual Studio, it was installed with Node version 0.12.2.

Using brew to install Node on OSX, I got version 5.3.0 installed. Apparently those version doesn't combine. So I followed this post to uninstall

Uninstall_Guide

and then I installed version 0.12.7 from nodejs.org. With these changes, I was finally able to deploy on a device attached to my Macbook.

Community
  • 1
  • 1
Mr. Blonde
  • 711
  • 2
  • 12
  • 27