1 Reply Latest reply on Sep 15, 2016 6:54 AM by kerrishotts

    How to Install Phonegap through CLI without Internet connection

    jakec86659707 Level 1

      Hello guys.


      I just want to know regarding with this matter because in the phonegap docs it wasnt stated there that if you install phonegap through CLI you need to have an internet connection.

      here is the command:

      npm install -g phonegap


      So with this, Do i really need an internet connection when installing phonegap through CLI?

      If YES, is there anyway where i can install phonegap without internet connection using the CLI? I dont want to use the desktop version since i want to have all the advantages of using CLI over the desktop version.


      please help me guys I badly need your help.THANK YOU!

        • 1. Re: How to Install Phonegap through CLI without Internet connection
          kerrishotts Adobe Employee

          You need an Internet connection at some point. Why?


          - npm install -g phonegap: downloads the PhoneGap CLI and associated dependencies from npm, which requires Internet access. You could download these to your local machine and install them that way, but either way, you need access to the Internet at some point.

          - phonegap create: by default it downloads the hello-world template. You can change this to a local directory.

          - phonegap platform add: downloads the platform from npm. Again, you can install from a local directory, but you will have to download the platform at some point.

          - phonegap plugin add: downloads the plugin From npm. You can install from a local directory, but you'll have had to download the plugin at some point.

          - The first time you build for Android, Gradle will be configured and download dependencies.


          Now, if you don't mind ferrying files back and forth from an environment that has Internet access, you can download the first four on to a USB stick and copy them to the environment that doesn't and then install from local directories. I'm not entirely sure what to do about the Gradle part. You can probably do something similar, but I've never tried.


          It's easier to have an Internet connection through the first build. After that (assuming you don't change platforms or plugins), I don't think you need an Internet connection until you need to deploy to an app store.

          1 person found this helpful