Could you please confirm ? that your theme have composer.json file in theme directory ?
If not than create composer.json file in your custom theme. Mention the theme details there and then run it for the same it will works !!
Composer.json file structure for custom theme :
{
"name": "magento/theme-frontend-yourthemename",
"description": "N/A",
"require": {
"php": "7.0.2|7.0.4|~7.0.6|~7.1.0",
"magento/theme-frontend-blank": "100.2.*",
"magento/framework": "101.0.*"
},
"type": "magento2-theme",
"version": "100.2.2",
"license": [
"OSL-3.0",
"AFL-3.0"
],
"autoload": {
"files": [
"registration.php"
]
}
}
if issue solved,Click Kudos & Accept as Solution