Ionic-cli: npm run ionic:serve - 'Waiting for connectivity with npm'

Created on 18 Dec 2019  路  1Comment  路  Source: ionic-team/ionic-cli

Description:

On trying to serve the application with npm, the application fails to serve with
multiple errors stating _'Waiting for connectivity with npm'_.

Steps to Reproduce:

  1. Create a new app with ionic start issue-app.
  2. Add following piece in the script of the package.json
    "ionic": "ionic",
    "ionic:serve": "ionic serve",
    "ionic:build": "ionic build"
  1. Execute the following command in command prompt.
    npm run ionic:serve
  2. Observe if the application serves at the port 8100.

The Application fails to serve in loaclhost:8100, ideally application should have served without any exception and redundant commands to ionic serve

Output:

cli issue

My ionic info:

Ionic:

   Ionic CLI                     : 5.4.9
   Ionic Framework               : @ionic/angular 4.7.1
   @angular-devkit/build-angular : 0.801.2
   @angular-devkit/schematics    : 8.3.8
   @angular/cli                  : 8.3.17
   @ionic/angular-toolkit        : 2.1.1

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res : 0.8.1
   native-run  : not installed

System:

   Android SDK Tools : 26.1.1 (C:\Apps\sdk)
   NodeJS            : v10.16.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

Other Information:

In ionic 3, the same was done with the help ionic-app-scripts like

    "ionic:serve": "ionic-app-scripts serve"
    "ionic:build": "ionic-app-scripts build"

but in ionic 4, the expectation would be to do the same with

    "ionic:serve": "ionic serve",
    "ionic:build": "ionic build"

like how Angular does with ng

triage

>All comments

Please see this documentation. By specifying those scripts, you're overriding the build/serve.

Was this page helpful?
0 / 5 - 0 ratings