Not able to create a strapi application from custom template

  • Node.js version: v16.17.0
  • NPM version: 8.15.0
  • Strapi version: 4.5.2
  • Database: postgresql
  • Operating system: WIndows 11

I have created a template of my strapi app using yarn strapi generate:template temp command and got temp folder with a template folder and a template.json file, which I uploaded on github in a public repo. But when I try to create a new strapi app using this template I get the following error.

Creating files.
Error: ⛔️ Template installation failed: Command failed: npm view {repo_url} name version --silent

Can anyone tell me what is wrong here?