May ionic vue team forget update document when after remove typescript and change the file of capacitor

Hi all, I have a problem with the capacitor the newest version of ionic CLI.
After an update the newest ionic CLI version to 6.16.3. The capacitor.config.json no longer an auto add-in folder anymore, instead of this is a capacitor.config.ts (or if remove typescript, so it’s capacitor.config.js).

after type ionic cap sync, I got the errors said about:


I had watched much time in the document say about after removing typescript, what we must change the file. But the document doesn’t say anything about the newest version after the update of the capacitor. Please someone help… thanks lots of.

The non ts Capacitor config file is a JSON file capacitor.config.json that looks something like this:

{
  "appId": "app.ionic.playground",
  "appName": "playground",
  "bundledWebRuntime": false,
  "npmClient": "npm",
  "webDir": "dist",
  "plugins": {
    "SplashScreen": {
      "launchShowDuration": 0
    }
  },
  "cordova": {},
}

@twestrick, Thanks lots of @twestrick for the answer :grinning:

I had try it before and get work, but the problem is after using:

ionic cap run android -l --external

After running that on the terminal, the JSON wasn’t updated to our JSON like the last version ionic/cli@^6.15.0
And I don’t know where should change the URL hostname even though using –external-url or –livereload-url. This not get work and run on my phone with localhost which not the IP domain.

And the newest version cli (6.16.3) after run ionic cap run android -l --external
this one always asks me which emulator should start to open (this one I don’t wanna expected happening, cause I don’t mean to test on the emulator), I watched the docs, but I didn’t found any solution for it. May I miss somewhere, maybe… :pensive:

the newest not like the older version would asking us about which one IP will select and then really start the open development server, then make a test in the phone.

I guess I don’t fully understand what you are trying to do. When you run ionic cap run android -l --external it is building your app and then deploying it to the device you choose without having to open up Android Studio. From my understanding, it should ask you to run on an emulated device or a physical device if it is connected to your computer.

When I run that same command, Capacitor temporarily modifies the following files:

  • android/app/src/main/AndroidManifest.xml
  • android/app/src/main/assets/capacitor.config.json

When you stop the run command, those changes get reversed (meaning you don’t want to commit them to your source control).

1 Like

Morning @twestrick, Bless you have the best day.
In my problem just simple like the below image.
in older version using ionic cap run android -l --no-open --external
it should ask me the IP, after choose it is going to move open the development server.

In the next version, @^6.16.3 would ask me the devices I must choose, but there’re no options to cancel choose the device emulator and after chose, it wouldn’t help add the server into capacitor.config.json

I wanna like the older version. cause sometimes our mobile devices unable to connect to android studio. Maybe have something wrong, so that why I don’t need an open emulator. Cause this makes my computer slower and makes a test on an emulator not much accuracy, so after making apk from android studio. I always download it and installed the test on my phone with server IP.

and the next problem if I didn’t use –no-open, it just helps me open the emulator, not android studio. :pensive:

EDIT:
I apologize for what I said. Today after re-update ionic to version 6.16.3, cli works pretty well for now.
But still have a problem is, I don’t know where the server should auto-update in which file, like the after-run development server if this is like the last version, it will be auto-update server into file capacitor.config.ts like below:

and I realize the problem is after run ionic cap runs android -l --external. The CLI just help me open the emulator, android studio no responsibility for any message or open it. :thinking:

I just feel like after the newest version CLI of ionic. The docs didn’t update, that make me confuse when lots of stuff change. :grinning: