2 Replies Latest reply on Nov 17, 2016 9:43 AM by maccladd

    Phonegap serve incredibly slow

    maccladd

      I'm working through basic tutorials on using phonegap (v6.3.5) and just running it on my PC for now.

       

      I'm also looking at using Angular2.

       

      When I combine the two worlds, the "Phonegap serve" takes a very long time to run and to start the server... I'm talking 15 minutes on a high spec PC.

       

      Since nothing is actually broken, there are no error messages, I just get...

       

      [phonegap] starting app server... ( this appears after a few minutes)

      [phonegap] listening on 10.0.5.73:3000 (this appears after about 15 minutes!)

      [phonegap]

      [phonegap] ctrl-c to stop the server

      [phonegap]

       

      I can navigate to the server address, and my app works.

       

      The Angular2 app is just the "hello world" pulled down from here...

      https://github.com/angular/quickstart

      With a tweaked index.html to combine it with phonegap and minor change to the tsconfig.json files to change the typescript compile option to generate "system" type modules.

      There is a healthy size node_modules directory.

       

      Is there anything I can do to try and determine why everything is so slow?

        • 1. Re: Phonegap serve incredibly slow
          kerrishotts Adobe Community Professional

          Does the same thing occur if you run this on a newly created hello-world project? That is:

           

          phonegap create test com.example.test test

          phonegap serve

           

          Does that take 15+ minutes as well?

           

          Does anything show up in your computer's event log or console (or equivalent)?

           

          Where is the node_modules directory located in relation to your project's www directory?

          • 2. Re: Phonegap serve incredibly slow
            maccladd Level 1

            That test project comes up straight away with no delay, although it does crash (different issue hopefully...). First error from the phonegap serve is:

             

            [phonegap] 200 /plugins/cordova-plugin-file/www/Flags.js

            rm: could not remove directory (code ENOTEMPTY): C:\Users\.....

             

            Going back to the original issue, the node_modules directory is immediately below the www directory.