I am new to Ionic, while build getting following error :
jenkins@ip-172-31-22-20:~/workspace/TestAngular$ ionic cordova build android
Running app-scripts build: --platform android --target cordova
[06:08:19] build dev started ...
[06:08:19] clean started ...
[06:08:19] clean finished in 1 ms
[06:08:19] copy started ...
[06:08:19] deeplinks started ...
[06:08:19] deeplinks finished in 51 ms
[06:08:19] transpile started ...
[06:08:23] typescript: src/app/app.component.ts, line: 12
Cannot find module '../pages/Wallet/'.
L11: import {DisclaimerPage} from '../pages/disclaimer/disclaimer'
L12: import {WalletPage} from '../pages/Wallet/'
L13: import {OrderhistoryPage} from '../pages/orderhistory/orderhistory'
[06:08:23] typescript: src/app/app.module.ts, line: 15
Cannot find module '../pages/Wallet/wallet'.
L14: import {DisclaimerPage} from '../pages/disclaimer/disclaimer'
L15: import {WalletPage} from '../pages/Wallet/wallet'
L16: import {OrderhistoryPage} from '../pages/orderhistory/orderhistory'
Error: Failed to transpile program
at new BuildError (/var/lib/jenkins/workspace/TestAngular/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
at /var/lib/jenkins/workspace/TestAngular/node_modules/@ionic/app-scripts/dist/transpile.js:159:20
at new Promise (<anonymous>)
at transpileWorker (/var/lib/jenkins/workspace/TestAngular/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
at Object.transpile (/var/lib/jenkins/workspace/TestAngular/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
at /var/lib/jenkins/workspace/TestAngular/node_modules/@ionic/app-scripts/dist/build.js:109:82
at <anonymous>
[06:08:23] copy finished in 3.76 s
It is saying "Cannot find module '../pages/Wallet/'."
how to get this module?
I tried :
jenkins@ip-172-31-22-20:~/workspace/TestAngular$ cordova platform remove android
Removing platform android from config.xml file...
Removing android from cordova.platforms array in package.json
getting the same error :
jenkins@ip-172-31-22-20:~/workspace/TestAngular$ ionic cordova build android
> cordova platform add android --save
Using cordova-fetch for cordova-android@~7.0.0
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.ionic.starter
PS:
I am using ionic 3 on ubuntu aws instance
Ionic Framework: 3.9.2
Ionic App Scripts: 3.1.9
Angular Core: 5.2.10
Angular Compiler CLI: 5.2.10
Node: 9.6.1
OS Platform: Linux 3.13
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
On L12 you forgot to mention name of the ts file.
It should be as below:
import {WalletPage} from '../pages/Wallet/wallet'
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments