Errors on build server

I cannot build app on remote build server for both native platforms (Ios and android)
First, I uploaded to git repo existed application on ionic+cordova, which I can build locally for android on windows and ios on mac.

We used phonegap buildserver previously, so in common I understand what is certificates, plugins, and how to make a builds remotely.

After fail I created a new project and tryed to compile it, and it fail again (both for ios, android). For android I got an error

[08:26:55]: --- Step: cap_sync ---
[08:26:55]: ----------------------
[08:26:55]: $ npx cap sync android
[08:26:56]: ▸ [error] android platform has not been added yet.
[08:26:56]: ▸ See the docs for adding the android platform:

if I try to compile test project on local pc, and I have this error too, but this case I can add platform via command line.

I don’t know how to do the same on remote build server.
I tried to install cordova , capacitor, both cordova and capacitor locally, then push files package.json, package-lock.json , config.xml from local pc to build server, but I had this error again and again.

Does anyone had the same errors? How You fix that? Is it possible to use build server without capacitor? thanks.

I found some answers by myself.
Maybe it helps someone in future.

  1. if you want to use capacitor, you should create projects on local pc, and you get 2 folders Android and Ios. You should add 2 this folders to git, and push them to server. after that message “[error] android platform has not been added yet.” gone
  2. if you want to use cordova, you need to delete all capacitor dependencies and all capacitor plugins from package.json, and also delete file capacitor.config.json. push changes, and server will switch to cordova mode. This give you ability to compile apps like closed server