vs-mad-remote build failed with error CordovaModul

2019-07-20 11:12发布

问题:

When I use vs-mda-remote to test cordova on mac, it failed with an error:

error CordovaModuleLoadError 4.1.2

and when I use vs-mda-remote test, the error is:

error CordovaModuleLoadError 4.3.0

vs-mda-remote

this start the server ok.

And I try the cordova, it can build success. Following is the full output:

New build request submitted:
/build/tasks?command=build&vcordova=4.1.2&cfg=release
{ 'accept-language': 'zh-CN',
  host: '192.168.1.244:3000',
  connection: 'keep-alive',
  'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 4.1.2; buildCommand: build; configuration: release
Build will be executed under: /Users/czcz1024/remote-builds/builds/610
Saving build request payload to : /Users/czcz1024/remote-builds/builds/610
Saved upload to /Users/czcz1024/remote-builds/builds/610/upload_610.tgz
Extracting /Users/czcz1024/remote-builds/builds/610/upload_610.tgz to /Users/czcz1024/remote-builds/builds/610/cordovaApp...
POST /build/tasks?command=build&vcordova=4.1.2&cfg=release 202 2291ms - 495b
GET /build/tasks/610 200 2ms - 495b
Extracted app contents from uploaded build request to /Users/czcz1024/remote-builds/builds/610/cordovaApp. Requesting build.
Taking 610 as current build
Building cordova app BlankCordovaApp1 at appDir /Users/czcz1024/remote-builds/builds/610/cordovaApp
Opened build log file /Users/czcz1024/remote-builds/builds/610/build.log
GET /build/tasks/610 200 1ms - 585b
Done building 610 : error CordovaModuleLoadError [ '4.1.2' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/610 200 1ms - 621b
GET /build/tasks/610/log 200 6ms

and follow is output run test

New build request submitted:
/build/tasks?vcordova=4.3.0&cfg=release&command=build&options=--emulator
{ host: 'localhost:3000',
  connection: 'close',
  'transfer-encoding': 'chunked' }
New build request submitted for cordovaVersion: 4.3.0; buildCommand: build; configuration: release
Build will be executed under: /Users/czcz1024/remote-builds/builds/611
Saving build request payload to : /Users/czcz1024/remote-builds/builds/611
Saved upload to /Users/czcz1024/remote-builds/builds/611/upload_611.tgz
Extracting /Users/czcz1024/remote-builds/builds/611/upload_611.tgz to /Users/czcz1024/remote-builds/builds/611/cordovaApp...
POST /build/tasks?vcordova=4.3.0&cfg=release&command=build&options=--emulator 202 217ms - 505b
Extracted app contents from uploaded build request to /Users/czcz1024/remote-builds/builds/611/cordovaApp. Requesting build.
Taking 611 as current build
Building cordova app HelloCordova at appDir /Users/czcz1024/remote-builds/builds/611/cordovaApp
Opened build log file /Users/czcz1024/remote-builds/builds/611/build.log
Done building 611 : error CordovaModuleLoadError [ '4.3.0' ]
Done with currentBuild. Checking for next build in queue.
GET /build/tasks/611 200 1ms - 627b

what's wrong?

回答1:

This might be a permissions issue with your .npm folder where the new version of vs-mda-remote tries to install the Cordova package.

Can you try to run the following 2 commands:

$ sudo npm cache clear 
$ sudo chown -R `whoami` ~/.npm

And then restart your vs-mda-remote server?