Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm run ionic:serve - 'Waiting for connectivity with npm' #4255

Closed
AntonyJos opened this issue Dec 18, 2019 · 4 comments
Closed

npm run ionic:serve - 'Waiting for connectivity with npm' #4255

AntonyJos opened this issue Dec 18, 2019 · 4 comments
Labels

Comments

@AntonyJos
Copy link

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 (cordova-lib@9.0.1)
   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

@ionitron-bot ionitron-bot bot added the triage label Dec 18, 2019
@imhoffd
Copy link
Contributor

imhoffd commented Dec 18, 2019

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

@imhoffd imhoffd closed this as completed Dec 18, 2019
@sachinshera
Copy link

remove ionic serve command form package.json

@thusithawijethunga
Copy link

ionic 7 also same, after add capacitor, package.json updated and make this warning. then remove ionic serve command form package.json

  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test",
    "lint": "ng lint"
  },

@ifelere
Copy link

ifelere commented Oct 10, 2023

Thank you all very much!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants