Error on using builder create command

I am getting this error when i use builder create command with api ke and store name
I searched but was not able to figure out what to do

Error creating space
ClientError: Response contains errors
{
“message”: “Target organization must be a root”,
“locations”: [
{
“line”: 1,
“column”: 27
}
],
“path”: [
“createSpace”
],
“extensions”: {
“code”: “INTERNAL_SERVER_ERROR”
}
}
at C:\Users\Admin\AppData\Roaming\npm\node_modules@builder.io\cli\node_modules\graphql-typed-client\dist\client\createClient.js:85:19
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
errors: [
{
message: ‘Target organization must be a root’,
locations: [Array],
path: [Array],
extensions: [Object]
}
]
}

This error happens when attempting to create a space from the CLI under another space instead of an organization. Please use the private key for your organization, not another space. You can get that here: https://builder.io/account/organization?root=true

Then choose one of the private keys available, or generate a new one.

thanks for the reply,
i did the same step mentioned above.
still getting the error.

Hey @gamersensei, happy to help debug this further, please send me in a direct message:

  • your public api key
  • the command you’re trying to run builder create ...

Sure mate, @aziz
where can i ping you.

Hey thanks for all the help, i fixed it.
i created a new space and created a key there.
and used the key then it worked

1 Like

Hey @gamersensei glad to hear you’re up and running!

@aziz - Thanks for writing this :+1:t5:

Hi, I tried by making a new space and then the new key but I still get the same error:

errors: [

  • {*
  •  message: 'Attempted to create a space under another space instead of an organization. Please use the private key for your organization, not another space. You can get that here: https://builder.io/account/organization?root=true',*
    
  •  locations: [Array],*
    
  •  path: [Array],*
    
  •  extensions: [Object]*
    
  • }*
  • ]*
    }

I have tried the suggested fix from this thread but did not work for me.
I have tried creating a new key, then i revoked it and created a new one and still get the same error…

Please help.

Hi @jeangar92, Welcome to Builder.io Forum!

I’m wondering if you mistakenly tried to fix the issue by using the private key of your archieve space, not an organization. Could you please confirm us that you’re using Private Keys under Organization Tab i.e. (Builder.io: Drag and drop page builder and CMS) ?

Garima!, Thanks for your reply, So the issue looks like it was me using the private key under space and not organization… I realized now with your response after I clicked the link you provided. The organization showed as archived and was able to use the private key anyway. I did unarchive it afterwards though. Thank you for your response and help!!!

1 Like

Hi @jeangar92, glad to hear that. If you need further help, please feel free to reach us again anytime!