microsoft / vsts-cordova-tasks

Streamline CI setup for your Apache Cordova, PhoneGap, Ionic, or Cordova CLI compatible app using a set of useful pre-defined build steps for VS Team Services or TFS
http://go.microsoft.com/fwlink/?LinkID=691188
Other
25 stars 27 forks source link

VSTS CI with IONIC 2 integration is failing - Both Add platform and Build Android tasks #74

Closed jln1989 closed 7 years ago

jln1989 commented 7 years ago

Hi,

Am trying to build a simple IONIC 2 project which is checked into the VSTS GIT and am continuously facing issue while adding android platform on one build agent and build android on a different agent.

Issue faced while adding platform on build agent A:

2017-08-22T09:08:38.3214115Z ionic@3.9.2 already installed. 2017-08-22T09:08:38.3214115Z Ionic Module Path: C:\Users\Innovation Panel\AppData\Roaming\taco_home\node_modules\ionic\3.9.2\node_modules\ionic 2017-08-22T09:08:38.7869986Z > cordova platform add android --save 2017-08-22T09:08:44.3677412Z × Running command - failed! 2017-08-22T09:08:44.3833950Z [ERROR] Exception: Using cordova-fetch for cordova-android@~6.2.2 2017-08-22T09:08:44.3833950Z 2017-08-22T09:08:44.3833950Z Error: Failed to fetch platform cordova-android@~6.2.2 2017-08-22T09:08:44.3833950Z Probably this is either a connection problem, or platform spec is incorrect. 2017-08-22T09:08:44.3833950Z Check your connection and platform name/version/URL. 2017-08-22T09:08:44.3833950Z Error: cmd: Command failed with exit code 1 Error output: 2017-08-22T09:08:44.3833950Z npm ERR! Windows_NT 10.0.15063 2017-08-22T09:08:44.3833950Z npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\Innovation Panel\AppData\Roaming\taco_home\node_modules\cordova\7.0.1\node_modules\npm\bin\npm-cli.js" "install" "cordova-android@~6.2.2" "--save" 2017-08-22T09:08:44.3833950Z npm ERR! node v6.11.0 2017-08-22T09:08:44.3833950Z npm ERR! npm v2.15.12 2017-08-22T09:08:44.3833950Z npm ERR! code EPEERINVALID 2017-08-22T09:08:44.3833950Z
2017-08-22T09:08:44.3833950Z npm ERR! peerinvalid The package ajv@4.11.8 does not satisfy its siblings' peerDependencies requirements! 2017-08-22T09:08:44.3833950Z npm ERR! peerinvalid Peer ajv-keywords@2.1.0 wants ajv@>=5.0.0 2017-08-22T09:08:44.3833950Z
2017-08-22T09:08:44.3833950Z npm ERR! Please include the following file with any support request:

Ionic Info of build agent A:

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 7.0.1

local packages:

@ionic/app-scripts : 2.1.3
Cordova Platforms  : android 5.1.1
Ionic Framework    : ionic-angular 3.6.0

System:

Node : v6.11.0
npm  : 3.10.10
OS   : Windows 10

Issue faced while android build on agent B:

Error in Agent B:

2017-08-22T10:07:15.8325697Z Using this version of Cordova with older version of cordova-android is 2017-08-22T10:07:15.8325697Z deprecated. Upgrade to cordova-android@5.0.0 or newer. 2017-08-22T10:07:15.8325697Z Error: Your android platform does not have Api.js

Ionic info of build agent B:

global packages:

@ionic/cli-utils : 1.1.2
Ionic CLI        : 3.1.2

System:

Node       : v7.10.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

Can someone help me on these issues? We are looking to use VSTS with Ionic2 for our CI process and we are completely stuck now.

jln1989 commented 7 years ago

We were able to resolve this issue after downgrading Ionic to 2.2.1 and Cordova to 6.5.0 in the agent's machine