title: Can't deploy Visual Studio Cordova app to iPhone using remote agent: CordovaModuleLoadError
body: <p>I am trying to deploy my Cordova app to my iPhone using Visual Studio 2015 RC by Remote Agent > Local Device. I have successfully installed, ran and connect the remote agent to my Visual Studio. According to this link, when I run Local Device, iTunes should pop up on my Windows PC and install the app to my iPhone:</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/dn757056.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/dn757056.aspx</a></p>
  
  <pre><code>New build request submitted:
  /build/tasks?command=build&amp;vcordova=4.3.0&amp;cfg=debug&amp;options=--device
  { 'accept-language': 'en-US',
    host: '192.168.0.9:3000',
    connection: 'keep-alive',
    'transfer-encoding': 'chunked' }
  New build request submitted for cordovaVersion: 4.3.0; buildCommand: build; configuration: debug
  Build will be executed under: /Users/JP/remote-builds/builds/3563
  Saving build request payload to : /Users/JP/remote-builds/builds/3563
  Saved upload to /Users/JP/remote-builds/builds/3563/upload_3563.tgz
  Extracting /Users/JP/remote-builds/builds/3563/upload_3563.tgz to /Users/JP/remote-builds/builds/3563/cordovaApp...
  POST /build/tasks?command=build&amp;vcordova=4.3.0&amp;cfg=debug&amp;options=--device 202 5123ms - 487b
  GET /build/tasks/3563 200 0ms - 487b
  Extracted app contents from uploaded build request to /Users/JP/remote-builds/builds/3563/cordovaApp. Requesting build.
  Taking 3563 as current build
  Building cordova app CordovaApp2 at appDir /Users/JP/remote-builds/builds/3563/cordovaApp
  Opened build log file /Users/JP/remote-builds/builds/3563/build.log
  Done building 3563 : error CordovaModuleLoadError [ '4.3.0' ]
  Done with currentBuild. Checking for next build in queue.
  GET /build/tasks/3563 200 4ms - 142.31kb
  GET /build/tasks/3563/log 200 1ms
  </code></pre>
  
  <p>Additionally, from Visual Studio I get the error:</p>
  
  <pre><code>EACCES, open '/Users/JP/.npm/_locks/cordova-46ce3f50013cb5f4.lock'  CordovaApp2 C:\Users\J\Documents\Visual Studio 2015\Projects\CordovaApp2\CordovaApp2\MDAVSCLI   1
  
  Remote build error from the build server undefined: {1} CordovaApp2 C:\Users\J\Documents\Visual Studio 2015\Projects\CordovaApp2\CordovaApp2\MDAVSCLI   1
  </code></pre>
  
  <p>When running remote test:</p>
  
  <pre><code>$ vs-mda-remote test --device
  Initializing self test for https
  downloading cert for pin 360583
  Downloading client cert for selftest from https://Jamess-Mac-mini.local:3000/certs/360583 to /Users/JP/remote-builds/selftest/selftest-client.pfx
  pfxPath: /Users/JP/remote-builds/selftest/selftest-client.pfx
  serverUrl: https://Jamess-Mac-mini.local:3000
  buildUrl: https://Jamess-Mac-mini.local:3000/build/tasks?vcordova=4.3.0&amp;cfg=release&amp;command=build&amp;options=--device
  Response statusCode: 202
  { 'x-powered-by': 'Express',
    'content-type': 'application/json',
    'content-location': 'https://jamess-mac-mini.local:3000/build/tasks/3570',
    'content-length': '489',
    date: 'Tue, 09 Jun 2015 22:05:58 GMT',
    connection: 'close' }
  Response: {
    "buildNumber": 3570,
    "status": "uploaded",
    "cordovaVersion": "4.3.0",
    "buildCommand": "build",
    "configuration": "release",
    "options": "--device",
    "buildDir": "/Users/JP/remote-builds/builds/3570",
    "serverDir": "/Users/JP/remote-builds",
    "submissionTime": "2015-06-09T22:05:58.691Z",
    "changeList": null,
    "tgzFilePath": "/Users/JP/remote-builds/builds/3570/upload_3570.tgz",
    "statusTime": "2015-06-09T22:05:58.763Z",
    "message": "Uploaded build request payload."
  }
  buildingUrl: https://Jamess-Mac-mini.local:3000/build/tasks?vcordova=4.3.0&amp;cfg=release&amp;command=build&amp;options=--device
  [1] Response:  {
    "buildNumber": 3570,
    "status": "error",
    "cordovaVersion": "4.3.0",
    "buildCommand": "build",
    "configuration": "release",
    "options": "--device",
    "buildDir": "/Users/JP/remote-builds/builds/3570",
    "serverDir": "/Users/JP/remote-builds",
    "submissionTime": "2015-06-09T22:05:58.691Z",
    "changeList": null,
    "tgzFilePath": "/Users/JP/remote-builds/builds/3570/upload_3570.tgz",
    "messageId": "CordovaModuleLoadError",
    "statusTime": "2015-06-09T22:05:59.752Z",
    "appDir": "/Users/JP/remote-builds/builds/3570/cordovaApp",
    "appName": "HelloCordova",
    "messageArgs": [
      "4.3.0"
    ]
  }
  </code></pre>