1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Ionic serve Cannot GET / Cannot find module '@ionic-native/splash-screen/ngx'

Discussão em 'Angular' iniciado por NeedHelp101, Maio 28, 2025.

  1. NeedHelp101

    NeedHelp101 Guest

    I'm trying to run Ionic and used the Ionic framework Ionic docs tutorial to install, but when I run Ionic serve, my browser opens to an error, 'Cannot GET /'

    I installed with npm install -g @ionic/cli and created the base template tabs, ionic start myApp tabs

    This is the error from ionic serve

    > ng run app:serve --host=localhost --port=8100
    [ng] Browserslist: caniuse-lite is outdated. Please run next command `npm update`
    [ng] ℹ 「wds」: Project is running at http://localhost:8100/webpack-dev-server/
    [ng] ℹ 「wds」: webpack output is served from /
    [ng] ℹ 「wds」: 404s will fallback to //index.html
    [ng] chunk {main} main.js, main.js.map (main) 2.03 kB [initial] [rendered]
    [ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 149 kB [initial] [rendered]
    [ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 6.09 kB [entry] [rendered]
    [ng] chunk {styles} styles.js, styles.js.map (styles) 109 kB [initial] [rendered]
    [ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 339 kB [initial] [rendered]
    [ng] Date: 2020-02-11T03:56:39.914Z - Hash: 9860ec75ab31a30a881b - Time: 5271ms
    [ng]
    [ng] ERROR in src/app/app.component.ts:4:30 - error TS2307: Cannot find module '@ionic-native/splash-screen/ngx'.
    [ng] 4 import { SplashScreen } from '@ionic-native/splash-screen/ngx';
    [ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [ng] src/app/app.module.ts:6:30 - error TS2307: Cannot find module '@ionic-native/splash-screen/ngx'.
    [ng] 6 import { SplashScreen } from '@ionic-native/splash-screen/ngx';
    [ng] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [ng]

    [INFO] Development server running!

    Local: http://localhost:8100

    Use Ctrl+C to quit this process

    [INFO] Browser window opened to http://localhost:8100!

    [ng] ℹ 「wdm」: Failed to compile.


    This my ionic info

    Ionic:

    Ionic CLI : 6.0.2 (/usr/local/lib/node_modules/@ionic/cli)
    Ionic Framework : @ionic/angular 4.11.10
    @angular-devkit/build-angular : 0.801.3
    @angular-devkit/schematics : 8.1.3
    @angular/cli : 8.1.3
    @ionic/angular-toolkit : 2.1.2

    Capacitor:

    Capacitor CLI : 1.5.0
    @capacitor/core : 1.5.0

    Utility:

    cordova-res : not installed
    native-run : not installed

    System:

    NodeJS : v13.2.0 (/usr/local/bin/node)
    npm : 6.13.1
    OS : macOS Catalina


    Strangely, when I run ionic serve -l for the lab, it gives me 2 black screens instead of the base template tabs.

    I've tried deleting the node modules folder and re-running npm install, but I'm still getting the same error.

    My package.json does contain the @ionic-native

    "@ionic-native/core": "^5.0.0",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",


    How do I get @ionic-native/splash-screen/ngx?

    Continue reading...

Compartilhe esta Página