3
votes

I got an error while trying to add a wp8 platform on my Win8, see detail as bellow,

~\CordovaWP8>cordova -d platforms add wp8 cordova library for "wp8" already exists. No need to download. Continuing. Checking if platform "wp8" passes minimum requirements... Checking wp8 requirements... Running ""~.cordova\lib\wp\cordova\3.1.0\wp8\bin\check_reqs"" (output to follow)

Creating wp8 project... Running bin/create for platform "wp8" with command: ""~.cordova\lib\wp\cordova\3.1.0\bin\create" "~\CordovaWP8\platforms\wp8" "~\namespace" "CordovaWP8"" (output to follow)

Error: An error occured during creation of wp8 sub-project. The system cannot find the path specified.

at ~\AppData\Roaming\npm\node_modules\cordova\src\platform.js:246:30
at ChildProcess.exithandler (child_process.js:641:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Process.ChildProcess._handle.onexit (child_process.js:802:5)

But I added an android platform successfully, any ideas?

1

1 Answers

5
votes

Seems to be a known issue, please see description and fix

https://issues.apache.org/jira/browse/CB-5183

Solution1. Install prev working version

npm uninstall -g cordova
npm install -g [email protected]

Solution2. Fix current version. The following instructions should work

  • Navigate to cordova installation folder

~\AppData\Roaming\npm\node_modules\cordova\

c:\Users\Sergei\AppData\Roaming\npm\node_modules\cordova

  • Replace the following files

src/metadata/wp8_parser.js with https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/metadata/wp8_parser.js

src/platform.js with https://github.com/sgrebnov/cordova-cli/blob/181aa1b7e8f3c8b2f7c4db12e1f79d64c26e8b42/src/platform.js