Angular Ionic - Blank Screen

Discussão em 'Angular' iniciado por Pascal von Flüe, Janeiro 1, 2025.

  1. I'm encountering an issue with Ionic Angular and would appreciate some help.

    I've worked on several Ionic projects in the past without significant issues. Recently, I decided to create a new blank Ionic project but ran into a major problem. Here’s what I did:

    Uninstalled Ionic and Angular. Reinstalled them using:

    npm i -g @ionic/cli
    npm install -g @angular/cli


    Created a new Blank Demo App with:

    ionic start myApp blank --type=angular


    The Problem

    When I run:

    ionic serve


    The browser app builds successfully and runs without issues.

    However, when I go through the process of creating the mobile app (adding the Android platform and building it), the app compiles without errors. But when I run it on an emulator or physical device, all I get is a blank screen. Inspecting the app via chrome://inspect reveals the following error:

    VM3:812 NullInjectorError: R3InjectorError(Platform: core)[t -> Cr]


    What I’ve Tried

    Used different templates, all result in the same blank screen. Noticed that Angular automatically updates to Angular 19 when creating a new project. Attempted to downgrade Angular to 16 or 17: Downgrading results in build errors during the Ionic build process, specifically stating that Angular 19 is required. Tried downgrading Ionic to version 6, but the issue persists. I have also tried this with multiple emulators and my actual device and all builds result in a blank screen.

    My Environment

    Angular CLI: 19.0.6
    Node.js: v18.20.0
    npm: 10.5.0
    Ionic CLI: 7.2.0
    Java: Java(TM) SE Runtime Environment (build 18.0.1+10-24)


    [​IMG] [​IMG] [​IMG]

    Continue reading...

Compartilhe esta Página