Moralis-admin-cli deploy What server do you want to connect to?:Invalid Input

I am following the NFTs tutorial https://www.youtube.com/watch?v=tBMk1iZa85Y.

In minute 31 we connect to the server by following these steps:
global install
npm install -g moralis-admin-cli

deploy:
moralis-admin-cli deploy

then, that asks me for the two api keys, but when it asks me which server to connect with, none appear.
para_mandar
I have a server created with the BSC testnet network.

I have tried to put the name of the server but it does not work either.

I installed moralis-admin-cli today in a separate folder, and I tested now with

npx moralis-admin-cli deploy -p test_deploy

and it works fine

you have to put there CLI API Key and CLI API Secret

is it necessary to add '' test_deploy ‘’?
to install it again in a separate folder I have to remove the global `` -g ‘’ parameter, right?

I have installed it locally not globally and it still does not detect the server.

it is not necessarily to add that test_deploy, I created there a folder for test to deploy it and that is why I added it as parameter

Did you copy exactly that CLI API Key and CLI API Secret?

do you have errors in cloud code now on that server?

No. My server works perfectly.

Is it possible that the use of moralis-admin-cli is only for payment accounts?
No works.

no, moralis-admin-cli should work fine with a free account

The server still does not detect me by entering the keys correctly.
para_mandar

it looks like it didn’t list any servers, you should see a list of servers there before choosing a server index

Exactly. That is the problem it indicated. I have a server but it is not detected despite correctly entering both the CLI APY KEY and the CLI APY SECRET

ok, can you try to remove current cloud code and update your server?

I try to update and re start the server and give me this error:

There is a Cloud Function Error (Syntax/Undefined Variables) on your code, in order to Update/Restart your server fix the error first, You can check the full Log on the Dashboard -> Logs -> Error

yes, I was expecting that, that is why I said first to remove current cloud code

What current cloud code
you mean? Do I delete the server and create a new one?

Or do you mean the cloud functions? I have the following;

Moralis.Cloud.define("getAvgGas", async function (request) {
  const query = new Moralis.Query("BscTransactions");
  const pipeline = [
    {
      group: {
        // group by "from_address"
        objectId: "$from_address",
        // add computed property avgGas
        // get average and convert wei to gwei
        avgGas: { $avg: { $divide: ["$gas_price", 1000000000]} },
      },
    },
    { sort: { avgGas: -1 } }, // sort by avgGas high to low
    { limit: 10 }, // only return top 10 results
  ];

  // the master key is required for aggregate queries
  const results = await query.aggregate(pipeline, { useMasterKey: true });
  return results;
})

no, I mean to remove that cloud code (cloud functions) after you make it a backup, in case that it is an error because of that code that it is added there

I’m trying to delete that function in the cloud but it won’t let me. The safeFile button does not update the delete code.

It gives me the impression that the most effective thing is to delete the server and create a new one.

what you mean by this, how it doesn’t let you to save?

exactly. dont let me save when remove the code.