问题
I am trying to add wp8 platform in my cordova app but when I run the command :
cordova platform add wp8
source: https://cordova.apache.org/docs/en/latest/guide/platforms/wp8/
It shows error message as below:
Error: Failed to fetch platform wp8
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "install" "wp8" "--save"
npm ERR! node v6.10.1
npm ERR! npm v3.10.10
npm ERR! code E404
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/wp8
npm ERR! 404
npm ERR! 404 'wp8' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! Please include the following file with any support request:
npm ERR! D:\Projects\hello\node_modules\npm-debug.log
回答1:
wp8
platform was dropped in cordova@7: JIRA issue
With cordova@7 you have to use windows
platform:
cordova platform add windows
cordova build windows -- --appx=8.1-phone
回答2:
Need a 64-bit version of Windows 8 Pro, either an installation disk or an ISO disk image file. The Pro version is necessary to run the device emulator.
来源:https://stackoverflow.com/questions/45137054/not-able-to-add-wp8-platform-in-cordova-app