0
votes

We are setting up automated Jenkins iOS & android builds for ionic 3 app. The Jenkins is a shared system by many teams and doesn't have ionic 3, instead it has following components. The iOS build is working fine without any issues, but when we try to build android, it is failing and throwing error :

can't find modules.

Can you please suggest what could be the issue?

$ npm -v
3.10.10
$ cordova -v
6.3.1
$ ionic -v
2.1.7
1
Logs please see below: + ionic build android --device --release ****************************************************** Dependency warning - for the CLI to run correctly, it is highly recommended to install/upgrade the following: Please install your Cordova CLI to version >=4.2.0 npm install -g cordova ******************************************************Uday
ionic-app-scripts build "--device" "--release" [2m[06:26:29][22m[36m ionic-app-scripts 2.1.3 [39m [2m[06:26:29][22m build dev started [2m...[22m [2m[06:26:29][22m clean started [2m...[22m [2m[06:26:29][22m clean finished [2min 2 ms[22m [2m[06:26:29][22m copy started [2m...[22m [2m[06:26:29][22m transpile started [2m...[22m [31m[06:26:37] typescript: src/app/app.module.ts, line: 23 [39m Cannot find module '../providers/badge-service/BadgeService'.Uday
Cannot find module '../services/ProfileService'. ----- Cannot find module '../../providers/user-service/UserService'. ------ [31m[06:26:37] ionic-app-script task: "build" [39m [31m[06:26:37] Error: Failed to transpile program [39m [31mError: Failed to transpile program at BuildError.Error (native)Uday
If you have some additional info, like logs, edit your original question and add them there, instead of adding comments.mag_zbc

1 Answers

0
votes

This was a typo which worked fine in iOS build

While importing modules, the file names started with small case, but in the import statement it was given as capitals. This caused the issue.