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

Issues with Ionic Command #70

Closed RDalziel closed 7 years ago

RDalziel commented 7 years ago

When running ionic command without any version overrides & picking up ionic 3.2.0 with Cordova 7.0.1 i'm experiencing issues with lodash dependencies.

The command i'm running is : ionic cordova build --device --release

The error i receive is

2017-05-27T15:35:30.4182510Z Module cache at /Users/vso113307/.taco_home/node_modules 2017-05-27T15:35:33.4855550Z cordova already installed. 2017-05-27T15:35:33.4887710Z Cordova Module Path: /Users/vso113307/.taco_home/node_modules/cordova/7.0.1/node_modules/cordova 2017-05-27T15:35:33.5013130Z Module cache at /Users/vso113307/.taco_home/node_modules 2017-05-27T15:35:36.2175550Z ionic already installed. 2017-05-27T15:35:36.2365330Z Ionic Module Path: /Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic 2017-05-27T15:35:38.3174950Z { Error: Cannot find module 'lodash' 2017-05-27T15:35:38.3198060Z 2017-05-27T15:35:38.3266470Z at Function.Module._resolveFilename (module.js:469:15) 2017-05-27T15:35:38.3293730Z at Function.Module._load (module.js:417:25) 2017-05-27T15:35:38.3332430Z at Module.require (module.js:497:17) 2017-05-27T15:35:38.3365350Z at require (internal/module.js:20:19) 2017-05-27T15:35:38.3408680Z at Object.load (/Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/modules.js:4:12) 2017-05-27T15:35:38.3461500Z at Config. (/Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/config.js:67:42) 2017-05-27T15:35:38.3506490Z at throw (native) 2017-05-27T15:35:38.3553060Z at rejected (/Users/vso113307/.taco_home/node_modules/ionic/3.2.0/node_modules/ionic/node_modules/@ionic/cli-utils/dist/lib/config.js:5:65) code: 'MODULE_NOT_FOUND' }

When i run the command manually via inline shell scripts i don't receive this error.

dpetrishin commented 7 years ago

Hi there.

I'm not completely understand where are you trying to put that command? Is that a local computer or cloud?

Please, give me more information.

RDalziel commented 7 years ago

This is using the VSTS Ionic Command Build Task Extension run on MacInCloud

vovikdrg commented 7 years ago

I have the same problem Also using MacInCloud.

vovikdrg commented 7 years ago

@RDalziel Try to require version 3.4.0 of ionic, the put command as "cordova build android". It was failing for me with 3.3.0 but today I tried with latest version and it just works

dpetrishin commented 7 years ago

@vovikdrg Yes, you are right about new ionic version. I think it was released just now or maybe 1 day ago :)

@RDalziel I also would like to suggest you to add npm step with npm install command in your build configuration in VSTS.

screen shot 2017-06-13 at 12 43 35 pm

For me it totally decided the problem.

RDalziel commented 7 years ago

I managed to get further with @vovikdrg suggestion - i've hit other problems with other updated pieces of the ionic framework but it seems this task does not work with ionic 3.3.0 and is resolved in 3.4.0.

@dmitriy-petrishin I do have NPM Install - it's a requirement for the rest of my build

dpetrishin commented 7 years ago

@RDalziel ok, that's good. I'll close this issue, if you have another questions feel free to re-open or create new issue.

Good luck.