Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing from a template not working #12453

Open
1 task
dowski opened this issue Nov 15, 2024 · 2 comments
Open
1 task

Installing from a template not working #12453

dowski opened this issue Nov 15, 2024 · 2 comments
Labels
needs triage Issue needs to be triaged

Comments

@dowski
Copy link

dowski commented Nov 15, 2024

Astro Info

I don't think this is relevant since I'm having an issue with `npm create astro@lastest`.

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

If I try to run npm create astro@latest with a template, it fails:

% npm create astro@latest -- --template mickasmt/astro-nomy           

> npx
> create-astro --template mickasmt/astro-nomy



 astro  Launch sequence aborted.

      ▲  error Template mickasmt/astro-nomy could not be found!
      ◼  check https://astro.build/examples
npm error code 1
npm error path /Users/christian/Development/timeline
npm error command failed
npm error command sh -c create-astro --template mickasmt/astro-nomy
npm error A complete log of this run can be found in: /Users/christian/.npm/_logs/2024-11-15T18_36_23_209Z-debug-0.log

I've tried a couple templates and have got the same result.

What's the expected result?

Creating from a template works, as described in the docs:

https://docs.astro.build/en/install-and-setup/#use-a-theme-or-starter-template

Link to Minimal Reproducible Example

npm create astro@latest -- --template mickasmt/astro-nomy

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Nov 15, 2024
@dowski
Copy link
Author

dowski commented Nov 15, 2024

Hmm, it seems like maybe the one in my example and the others I tried aren't valid templates?

Do templates need to be verified before they can be listed on https://astro.build/themes/?

@dowski
Copy link
Author

dowski commented Nov 15, 2024

Oh I think I might understand now - the repos that fail use branch name master instead of main. The @bluwy/giget-core code that Astro uses when fetching templates defaults to main. If I change my install command to specify branch #master, it works.

npm create astro@latest -- --template mickasmt/astro-nomy#master

I wonder if that should be documented or handled automatically by the npm create astro command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant