Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cordova windows error: "cordova/windows8/commandProxy" not found

I have built a Cordova-based Windows application. As soon as I add any plugin, the app starts crashing with the exception cordova/windows8/commandProxy not found.

Cordova version: 4.3.0

like image 395
Chirag Chauhan Avatar asked May 06 '15 06:05

Chirag Chauhan


1 Answers

It seems that cordova/windows8/commandProxy is deprecated in Cordova 4.3.0.

I have replaced this statement in plugin file

require("cordova/windows8/commandProxy")

to

require("cordova/exec/proxy")

and it seems to work.

For example I changed line number 18 in PushPluginProxy.js from

require("cordova/windows8/commandProxy").add("PushPlugin", module.exports);

to

require("cordova/exec/proxy").add("PushPlugin", module.exports); 

The name in the string varies depending on the plugin.

Alternatively, you can patch the plugin like in this pull request from the AppVersion plugin i.e.:

Change

require("cordova/windows8/commandProxy").add("AppVersion", AppVersionProxy);

to

cordova.commandProxy.add("AppVersion", AppVersionProxy);
like image 123
Pajdziu Avatar answered Oct 14 '22 12:10

Pajdziu