ionic-team / ionic-team/ionic-framework
bug: Application not work property on production mode
- 主要言語
- TypeScript
- スター
- 52.7k
- フォーク
- 13.3k
- 平均マージ
- 1日 15時間
- マージ済み PR(30日)
- 51
説明
### Prerequisites
- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.
### Ionic Framework Version
v8.x
### Current Behavior
If code is running in dev live mode `ionic capacitor run android -l --external` work correctly - modal is showing
But in production mode `ionic capacitor run android` / `ionic capacitor build android --prod` modal is not showing
In console is only

Example code
```
import { Component, OnInit } from '@angular/core';
import { IonicModule } from '@ionic/angular';
@Component({
standalone: true,
selector: 'app-test',
template: '
Hello Modal!
imports: [IonicModule]
})
export class TestPage implements OnInit {
constructor() {
console.log('TestPage constructor called');
}
ngOnInit() {
console.log('TestPage ngOnInit called');
}
}
---
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonButton, IonicModule,TestPage],
})
export class HomePage {
constructor(
private modalCtrl: ModalController,
) { }
async test() {
console.log(this.modalCtrl);
console.log('start');
try {
const modal = await this.modalCtrl.create({
component: TestPage,
});
console.log('Modal object after creation (if await works):', modal);
await modal.present();
console.log('Modal presented!');
} catch (error) {
console.error('Error creating or presenting modal:', error);
}
}
}
----
test
```
### Expected Behavior
Code should work on this samo way in production mode and live mode
### Steps to Reproduce
1. cerate new blank angular type application
2. add capacitor android
3. add new page
4. Create and present ModalController with component from step 3
5. run android capacitor in "not live mode"
### Code Reproduction URL
https://github.com/mzawodzinski/ionicIssue
### Ionic Info
[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module
'@capacitor/ios/package.json'
Require stack:
- /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
- /usr/local/lib/node_modules/@ionic/cli/lib/index.js
- /usr/local/lib/node_modules/@ionic/cli/index.js
- /usr/local/lib/node_modules/@ionic/cli/bin/ionic
Ionic:
Ionic CLI : 7.2.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.5.7
@angular-devkit/build-angular : 19.2.13
@angular-devkit/schematics : 19.2.13
@angular/cli : 19.2.13
@ionic/angular-toolkit : 12.2.0
Capacitor:
Capacitor CLI : 7.2.0
@capacitor/android : 7.2.0
@capacitor/core : 7.2.0
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.19.0 (/usr/bin/node)
npm : 11.4.1
OS : Linux 6.9
### Additional Information
_No response_
コントリビューションガイド
評価
この issue はまだ評価されていません。