ionic cordova build android Cannot find module '../pages/Wallet/'

Ashish Karpe

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
Yuvraj Patil

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.

edited at
0

Comments

0 comments
Login to comment

Related

Ionic Cordova Build prod: Cannot find module “.” - Typescript version >3

Cordova 8.1.1 android build: cannot find module xcode

Cannot find name 'cordova'. ionic build ios

Cannot load module with Cordova and Ionic on Android

Ionic build cannot find module error. How to import Android plugin?

Cordova 4.3.0 - build command returns error Cannot find module 'Q'

Ionic + Cordova Android build error - could not find tools.jar

Ionic 3: Build in “prod” mode: Cannot find module “.”

Ionic build error Cannot find module './scheduler/Action'

ng build cannot find module

ionic cordova build android : Error: spawn EACCES

ionic cordova build android failed due to AOT

Error in ionic cordova build android --prod

issue with " ionic cordova build android --prod --release"

ionic cordova build Android showing lint warnings

Typescript, Firebase, Cordova: Cannot find module for 'firebase'

Cannot find apk architecture when run command "ionic cordova run android"

Dynamic Environment Variables in Ionic - Cannot find module

Cannot find module generated with “Ionic g provider”

Ionic 2 - Runtime error Cannot find module "."

Ionic 2 cannot find module 'dgram'

Cannot find module "ionic-native"

Ionic => Runtime error: Cannot find module "."

Ionic/Angular Issue Cannot find module './fs'

Cannot find Ionic-angular module

cordova build android give error "The system cannot find the path specified."

Failed cordova android build with not find symbols on windows

Cannot find androidTestCompile on Android build

Cannot find module '../build/Release/bson'. NodeJS