gpt4 book ai didi

android - ionic cordova build android找不到模块 '../pages/Wallet/'

转载 作者:行者123 更新时间:2023-12-04 19:12:24 25 4
gpt4 key购买 nike

我是 Ionic 的新手,在构建时出现以下错误:

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

它说“找不到模块'../pages/Wallet/'。”

如何获得这个模块?

我试过了 :
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

得到同样的错误:
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

最佳答案

在 L12 上,您忘记提及 ts 文件的名称。

它应该如下所示:

import {WalletPage} from '../pages/Wallet/wallet'

关于android - ionic cordova build android找不到模块 '../pages/Wallet/',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50384570/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com